简体   繁体   English

如何在braintree交易销售中设置货币格式

[英]How to set Currency Format in braintree transaction sale

I create a APP in which i use Braintree Payment Gateway. 我创建了一个使用Braintree Payment Gateway的APP。 In my application i make options to set different currency, am just know that how to set currency when i set sale transaction param. 在我的应用程序中,我设置选项来设置不同的货币,我只知道如何设置货币当我设置销售交易参数。

here is my code 这是我的代码

$result = Braintree\Transaction::sale([
                    'amount' => '50.00',
                    'creditCard' => array(
                     'cardholderName' => 'Test Name',
                     'number' => '4000111111111511',
                     'expirationDate' => '12/2018',
                     'cvv' => '123',
                    ),
                    'options' => [ 'submitForSettlement' => true]
              ]);

All of my transaction made in US Dollar, but i want to make transaction in different currencies. 我的所有交易均以美元进行,但我希望以不同货币进行交易。

Please someone give me the solution. 请有人给我解决方案。 thanks 谢谢

Full disclosure: I work at Braintree. 完全披露:我在Braintree工作。 If you have any further questions, feel free to contact support . 如果您有任何其他问题,请随时联系支持

You will need to set up a different merchant account for each currency you would like to process. 您需要为要处理的每种货币设置不同的商家帐户 Then, when processing a transaction for a specific currency, you can pass in the merchant account id to the transaction sale method . 然后,在处理特定货币的交易时,您可以将商家帐户ID传递给交易销售方法

In addition, to keep your PCI compliance burden low, you will want to pass a nonce to your server in place of the credit card details. 此外,为了降低PCI合规性负担,您需要将nonce传递到服务器以代替信用卡详细信息。

$merchantAccountId = someFunctionToLookupCorrectMerchantIdBasedOnCurrency();

$result = Braintree\Transaction::sale([
    'amount' => '100.00',
    'paymentMethodNonce' => nonceFromTheClient,
    'merchantAccountId' => $merchantAccountId,
    'options' => [
        'submitForSettlement' => True
    ]
]);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM