Class: Spree::Api::V2::Storefront::Stripe::SetupIntentsController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/spree_api_v2/spree/api/v2/storefront/stripe/setup_intents_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#require_stripe_gateway, #stripe_gateway

Instance Method Details

#createObject



9
10
11
12
13
# File 'lib/spree_api_v2/spree/api/v2/storefront/stripe/setup_intents_controller.rb', line 9

def create
  setup_intent = SpreeStripe::CreateSetupIntent.call(gateway: stripe_gateway, user: try_spree_current_user)

  render_serialized_payload(200) { setup_intent.value }
end