Class: Ecko::Plugins::Stripe::Engine

Inherits:
Object
  • Object
show all
Defined in:
lib/ecko/plugins/stripe/engine.rb

Class Method Summary collapse

Class Method Details

.authenticateObject

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_referenceObject

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