简体   繁体   English

PHP中的Braintree API-强制交易货币

[英]Braintree API in PHP - enforce currency for transaction

I am trying to enforce a currency for a transaction via the Braintree API but I cannot see how this is done. 我正在尝试通过Braintree API强制进行交易的货币,但是我看不到如何完成。 Stripe is very easy, as the currency (AUD, USD) is passed to the Stripe server as part of the execution. Stripe非常容易,因为货币(澳元,USD)作为执行的一部分传递到Stripe服务器。

With Braintree what I can see is that the currency is dependent on the merchant account receiving the money. 使用Braintree,我可以看到货币取决于接收钱的商人帐户。 My app will allow a user to invoice their customer, so the user will select the presentment currency of the invoice. 我的应用程序将允许用户向其客户开具发票,因此用户将选择发票的显示货币。 I want to lock this selection to their merchant account currency. 我想将此选择锁定为他们的商人帐户货币。

If I understood this correctly, then pushing a transaction of MYR 250 (for example) and having a customer pay for this, if the merchant account behind the transaction is a EUR account, then the customer was presented by my app a MYR 250 value, but his CC is debited a EUR 250 value. 如果我正确理解了这一点,则进行了一笔250令吉的交易(例如),并让客户为此付款,如果交易背后的商家帐户是欧元帐户,那么我的应用向客户显示了250令吉的价值,但他的CC已扣除了250欧元的价值。

Is there a way to do this with Braintree? 有没有办法用Braintree做到这一点? I want to do this with the standard merchant accounts and not under the Master Merchant set up. 我要使用标准商家帐户而不是在“主商家”设置下进行此操作。

Alternatively, is there a way to confirm the currency of an account from the Merchant Id / keys that a user supplies my app? 或者,是否可以通过用户提供我的应用的商户ID /密钥来确认帐户的币种?

I have read the entire API docs, but I cannot see how this is done. 我已经阅读了整个API文档,但是看不到如何完成。 Did i miss something? 我错过了什么? It has been a long week already! 已经整整一周了!

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

It's possible to have different presentment currencies and settlement currencies. 可以使用不同的演示货币和结算货币。 To set this up, please check out this section and email the Braintree Accounts team directly: accounts@braintreepayments.com 要进行设置,请查看本并直接向Braintree客户团队发送电子邮件:account@braintreepayments.com

To confirm the currency associated with a MerchantAccount, you can call MerchantAccount.find using a merchant_account_id . 确认与一个商家相关联的货币,你可以调用MerchantAccount.find使用merchant_account_id With the MerchantAccount object, you can check its currency_iso_code attribute. 使用MerchantAccount对象,可以检查其currency_iso_code属性。

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

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