Class: Ecko::Plugins::StripeCallbacksController
- Inherits:
-
Object
- Object
- Ecko::Plugins::StripeCallbacksController
- Defined in:
- app/controllers/ecko/plugins/stripe_callbacks_controller.rb
Instance Method Summary collapse
- #intent ⇒ Object
-
#success ⇒ Object
This can be used to extend and run the payment success.
- #view_response ⇒ Object
Instance Method Details
#intent ⇒ Object
15 16 17 |
# File 'app/controllers/ecko/plugins/stripe_callbacks_controller.rb', line 15 def intent @intent ||= StripePaymentIntent.find_by(code: params[:state]) end |
#success ⇒ Object
This can be used to extend and run the payment success.
6 7 8 9 10 11 12 13 |
# File 'app/controllers/ecko/plugins/stripe_callbacks_controller.rb', line 6 def success raise Ecko::Plugins::Stripe::InvalidPaymentIntent if intent.nil? @message = intent.['success_message'] Object.const_get(intent.['callback']).process(intent) view_response end |
#view_response ⇒ Object
19 |
# File 'app/controllers/ecko/plugins/stripe_callbacks_controller.rb', line 19 def view_response; end |