Class: Pay::PaymentsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/pay/payments_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject

Intents on a Stripe Connect account are linked with ?stripe_account=acct_123



8
9
10
11
12
# File 'app/controllers/pay/payments_controller.rb', line 8

def show
  @payment = Payment.from_id(params[:id], stripe_account: params[:stripe_account].presence)
rescue ::Stripe::StripeError => e
  redirect_to root_path, alert: e.message
end