Module: Payify::PaymentsControllerConcern

Extended by:
ActiveSupport::Concern
Included in:
PaymentsController
Defined in:
app/controllers/concerns/payify/payments_controller_concern.rb

Instance Method Summary collapse

Instance Method Details

#completeObject



18
19
20
21
22
23
24
25
# File 'app/controllers/concerns/payify/payments_controller_concern.rb', line 18

def complete
  @payment.stripe_confirm_payment unless @payment.paid?

  respond_to do |format|
    format.html
    format.json { render json: @payment }
  end
end

#newObject



9
10
11
12
13
14
15
16
# File 'app/controllers/concerns/payify/payments_controller_concern.rb', line 9

def new
  @payment.stripe_init_intent

  respond_to do |format|
    format.html
    format.json { render json: @payment }
  end
end