Class: Ecko::Plugins::Stripe::Checkout
- Inherits:
-
Authenticator
- Object
- Authenticator
- Ecko::Plugins::Stripe::Checkout
- Defined in:
- lib/ecko/plugins/stripe/checkout.rb
Instance Attribute Summary
Attributes inherited from Authenticator
Instance Method Summary collapse
- #run ⇒ Object
-
#session ⇒ Object
Creates a session based on the parameters send.
Methods inherited from Authenticator
execute, #initialize, #state_secret
Constructor Details
This class inherits a constructor from Ecko::Plugins::Stripe::Authenticator
Instance Method Details
#run ⇒ Object
7 8 9 |
# File 'lib/ecko/plugins/stripe/checkout.rb', line 7 def run session.url end |
#session ⇒ Object
Creates a session based on the parameters send
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/ecko/plugins/stripe/checkout.rb', line 12 def session @session ||= ::Stripe::Checkout::Session.create( payment_method_types: payment_method_types, mode: 'payment', submit_type: params[:submit_type] || 'pay', client_reference_id: SecureRandom.uuid, success_url: success_url, cancel_url: cancel_url, line_items: line_items ) end |