Class: Ecko::Plugins::Stripe::Engine
- Inherits:
-
Object
- Object
- Ecko::Plugins::Stripe::Engine
- Defined in:
- lib/ecko/plugins/stripe/engine.rb
Class Method Summary collapse
-
.authenticate ⇒ Object
It helps authenticate the stripe plugin api key.
-
.checkout(params) ⇒ Object
Creates a checkout session with a payment intent as well.
-
.checkout_reference ⇒ Object
This will provide the checkout reference for other plugins as well Currently ecko sponsor plugin uses this.
-
.configure(schema) ⇒ Object
Configures all the schema and setups the configurations instance of the plugin.
Class Method Details
.authenticate ⇒ Object
It helps authenticate the stripe plugin api key.
17 18 19 |
# File 'lib/ecko/plugins/stripe/engine.rb', line 17 def authenticate ::Stripe.api_key = Ecko::Plugins::Stripe::Configurations.instance.stripe_api_key end |
.checkout(params) ⇒ Object
Creates a checkout session with a payment intent as well.
28 29 30 |
# File 'lib/ecko/plugins/stripe/engine.rb', line 28 def checkout(params) checkout_reference.execute(params) end |
.checkout_reference ⇒ Object
This will provide the checkout reference for other plugins as well Currently ecko sponsor plugin uses this.
23 24 25 |
# File 'lib/ecko/plugins/stripe/engine.rb', line 23 def checkout_reference Ecko::Plugins::Stripe::Checkout end |
.configure(schema) ⇒ Object
Configures all the schema and setups the configurations instance of the plugin
12 13 14 |
# File 'lib/ecko/plugins/stripe/engine.rb', line 12 def configure(schema) Ecko::Plugins::Stripe::Configurations.instance.setup(schema) end |