如何在 braintree 交易销售中设置货币格式
How to set Currency Format in braintree transaction sale
我创建了一个使用 Braintree 支付网关的应用程序。在我的应用程序中,我选择设置不同的货币,我只知道在设置销售交易参数时如何设置货币。
这是我的代码
$result = Braintree\Transaction::sale([
'amount' => '50.00',
'creditCard' => array(
'cardholderName' => 'Test Name',
'number' => '4000111111111511',
'expirationDate' => '12/2018',
'cvv' => '123',
),
'options' => [ 'submitForSettlement' => true]
]);
我所有的交易都是用美元进行的,但我想用不同的货币进行交易。
请有人给我解决方案。
谢谢
完全披露:我在 Braintree 工作。如果您还有任何问题,请随时contact support.
您将需要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。
此外,为了降低您的 PCI 合规负担,您需要 pass a nonce to your server 代替信用卡详细信息。
$merchantAccountId = someFunctionToLookupCorrectMerchantIdBasedOnCurrency();
$result = Braintree\Transaction::sale([
'amount' => '100.00',
'paymentMethodNonce' => nonceFromTheClient,
'merchantAccountId' => $merchantAccountId,
'options' => [
'submitForSettlement' => True
]
]);
我创建了一个使用 Braintree 支付网关的应用程序。在我的应用程序中,我选择设置不同的货币,我只知道在设置销售交易参数时如何设置货币。
这是我的代码
$result = Braintree\Transaction::sale([
'amount' => '50.00',
'creditCard' => array(
'cardholderName' => 'Test Name',
'number' => '4000111111111511',
'expirationDate' => '12/2018',
'cvv' => '123',
),
'options' => [ 'submitForSettlement' => true]
]);
我所有的交易都是用美元进行的,但我想用不同的货币进行交易。
请有人给我解决方案。 谢谢
完全披露:我在 Braintree 工作。如果您还有任何问题,请随时contact support.
您将需要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。
此外,为了降低您的 PCI 合规负担,您需要 pass a nonce to your server 代替信用卡详细信息。
$merchantAccountId = someFunctionToLookupCorrectMerchantIdBasedOnCurrency();
$result = Braintree\Transaction::sale([
'amount' => '100.00',
'paymentMethodNonce' => nonceFromTheClient,
'merchantAccountId' => $merchantAccountId,
'options' => [
'submitForSettlement' => True
]
]);