Class: Payify::PaymentsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/payify/payments_controller.rb

Instance Method Summary collapse

Instance Method Details

#completeObject



14
15
16
17
18
19
20
21
# File 'app/controllers/payify/payments_controller.rb', line 14

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

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

#newObject



5
6
7
8
9
10
11
12
# File 'app/controllers/payify/payments_controller.rb', line 5

def new
  @payment.stripe_init_intent

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