Class: Dune::Balanced::Creditcard::PaymentsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Dune::Balanced::Creditcard::PaymentsController
- Defined in:
- app/controllers/dune/balanced/creditcard/payments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/dune/balanced/creditcard/payments_controller.rb', line 9 def create attach_card_to_customer update_customer payment = Payment.new('balanced-creditcard', customer, resource, resource_params) payment.checkout! redirect_to(*checkout_response_params(resource, payment.successful?)) end |
#new ⇒ Object
5 6 7 |
# File 'app/controllers/dune/balanced/creditcard/payments_controller.rb', line 5 def new @cards = customer.cards end |