ruby on rails - ActiveMerchant Get Braintree ClientToken -
i trying use activemerchant braintree dropin ui , unable find correct methods create client token pass javascript sdk. current setup is:
# config/environments/development.rb # activemerchant configuration. activemerchant::billing::base.mode = :test config.gateway = activemerchant::billing::braintreegateway.new( merchant_id: '', public_key: '', private_key: '' )
and have controller needs send client token part of api request:
# app/controllers/v1/orders_controller.rb def token @client_token = ...generate client token... respond_with @client_token end
i don't know how generate token through activemerchant api.
i work @ braintree. if have more questions, suggest email our support team.
activemerchant isn't compatible v.zero. use drop-in ui or other v.zero features, you'll need use braintree ruby client library directly. see braintree "getting started" guide instructions.
Comments
Post a Comment