Sha256: 6d41a35f468f19a0ec9164e49b099b62443bed4ba6e3b6b8b14b625e65d55016
Contents?: true
Size: 415 Bytes
Versions: 7
Compression:
Stored size: 415 Bytes
Contents
class Spree::Api::BraintreeClientTokenController < Spree::Api::BaseController def create if params[:payment_method_id] gateway = Solidus::Gateway::BraintreeGateway.find_by!(id: params[:payment_method_id]) else gateway = Solidus::Gateway::BraintreeGateway.find_by!(active: true) end render json: { client_token: gateway.generate_client_token, payment_method_id: gateway.id } end end
Version data entries
7 entries across 7 versions & 1 rubygems