-
Notifications
You must be signed in to change notification settings - Fork 60
4. Multi currency
Braintree supports 130+ currencies. Braintree account can have multiple merchant accounts to process transactions for different currencies. Each merchant account ID is associated to specific currency.
Spree Braintree Vzero stores merchant account ids in gateway preferences as a hash, where key is currency in ISO 4217 format and value is merchant account id.
{ 'USD' => 'my_usd_merchant_account_id' }
In order to process multi-current transactions with Spree Braintree Vzero currency_merchant_account
preference needs to be set for each active Braintree gateway. For example:
gateway = Spree::Gateway::BraintreeVzeroHostedFields.take
gateway.preferred_currency_merchant_accounts = {
'USD' => 'my_usd_merchant_account_id',
'EUR' => 'my_eur_merchant_account_id'
}
gateway.save
Out of the box, Spree Braintree Vzero gives no access to merchant account preference for admin. However pull request in this matter is more than welcome.
Spree Braintree Vzero works flawlessly with Spree Multi-Currency, still being independent from this extension.