2015-11-25 127 views
1

我创建了一个APP,其中使用了Braintree支付网关。在我的应用程序中,我选择设置不同的货币,我只知道如何设置货币,当我设置销售交易参数。如何在braintree交易出售中设置货币格式

这里是我的代码

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

我所有的交易中美元由,但我想使交易在不同的货币。

请有人给我解决方案。 谢谢

回答

2

完全披露:我在布伦特里工作。如果您有任何其他问题,请随时致电contact support

对于您想要处理的每种货币,您将需要set up a different merchant account。然后,在处理特定货币的交易时,您可以传入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 
    ] 
]); 
+0

谢谢BladeBarringer – Sahill