braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

How to pay with different currency? #298

Closed WeTruck closed 3 years ago

WeTruck commented 3 years ago

I'm following this link: https://developers.braintreepayments.com/start/hello-server/php#create-a-transaction

$result = $gateway->transaction()->sale([
  'amount' => '10.00',
  'paymentMethodNonce' => $nonceFromTheClient,
  'deviceData' => $deviceDataFromTheClient,
  'options' => [
    'submitForSettlement' => True
  ]
]);

It's working properly. But paying always in USD. How can I pay from different currency? Like is there any object for currency? As 'currency' => 'EUR'

Looking for help. Thanks in advance.

sestevens commented 3 years ago

Hi @WeTruck, the currency is determined by your merchant account ID. We explain this a bit more in the developer docs.

WeTruck commented 3 years ago

Thanks @sestevens How can I change my merchant account currency then? I'm on sandbox mode.

sestevens commented 3 years ago

Here's a link with instructions: https://articles.braintreepayments.com/get-started/try-it-out#testing-currencies.

crookedneighbor commented 3 years ago

For additional help with this, please reach out to our support team: https://help.braintreepayments.com/

WeTruck commented 3 years ago

Thanks @sestevens @crookedneighbor