Class: SolidusNexio::CreditCardsController

Inherits:
BasePaymentController show all
Defined in:
app/controllers/solidus_nexio/credit_cards_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  token = payment_method.store(credit_card_params)
  if token
    render json: { data: { token: token } }, status: 201
  else
    head 422
  end
end