Class: Reji::PaymentController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/reji/payment_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/reji/payment_controller.rb', line 7

def show
  @stripe_key = Reji.configuration.key

  @payment = Reji::Payment.new(
    Stripe::PaymentIntent.retrieve(
      params[:id], Reji.stripe_options
    )
  )

  @redirect = params[:redirect]

  render template: 'payment'
end