Module: Spree::Billing::PaymentCreatable
- Included in:
- PaymentsController
- Defined in:
- app/controllers/concerns/spree/billing/payment_creatable.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/controllers/concerns/spree/billing/payment_creatable.rb', line 6 def create invoke_callbacks(:create, :before) begin load_payments create_payment rescue Spree::Core::GatewayError => e invoke_callbacks(:create, :fails) flash[:error] = e..to_s redirect_to new_billing_order_payment_path(@order) end end |