Sha256: 9be2670e955d83bd686914008eb76e61deab30059c210a5338a5b94232726967
Contents?: true
Size: 870 Bytes
Versions: 15
Compression:
Stored size: 870 Bytes
Contents
# frozen_string_literal: true module SolidusNexio class CreditCardsController < BasePaymentController def create token = payment_method.store(credit_card_params) if token render json: { data: { token: token } }, status: 201 else head 422 end end private def credit_card_params params.require(:data).permit(:currency, :one_time_token, address: %i[address1 address2 city country phone zip state], billing_address: %i[address1 address2 city country phone zip state], card: ::Spree::PermittedAttributes.source_attributes, customer: %i[first_name last_name email], order: %i[number date]).to_h.deep_symbolize_keys end end end
Version data entries
15 entries across 15 versions & 1 rubygems