【问题标题】:Which Braintree API to use to pay multiple vendors at checkout在结账时使用哪个 Braintree API 向多个供应商付款
【发布时间】:2016-12-01 00:41:52
【问题描述】:

我希望获得一些关于如何在 Braintree 中完成此任务的“方向”:

我有一个网站,多个供应商可以在其中销售他们的产品。客户可以将来自多个供应商的商品添加到购物车。如果有来自 2 个供应商的物品,那么在结帐时,付款应分成两个收件人。 我可以使用哪个 API 在 Braintree 中完成此操作?我读过的大多数示例和资源只有一个收件人。 你们会有一些包含多个收件人的示例代码吗?

【问题讨论】:

    标签: payment-gateway braintree marketplace


    【解决方案1】:

    全面披露:我在 Braintree 工作。如果您还有任何问题,请随时联系support

    目前没有办法只通过一个Transaction.sale 电话进行多卖家购物车结账。

    如果您想向 Marketplace 中的多个商家发送付款并且不介意记录多笔交易,您可以多次致电 Transaction.sale,将当前商家帐户 ID 替换为 merchant_account_id。另请注意,您需要payment_method_token,您可以在here 上找到更多信息

    result = Braintree::Transaction.sale(
      :merchant_account_id => "provider_sub_merchant_account",
      :amount => "10.00",
      :payment_method_token => "payment_method_token",
      :service_fee_amount => "your_service_fee"
    )
    

    有关 Marketplace 的更多信息,请查看the Braintree documentation

    【讨论】:

      猜你喜欢
      • 2015-04-24
      • 2010-10-22
      • 2017-04-15
      • 2017-05-10
      • 1970-01-01
      • 2014-11-03
      • 2011-06-16
      • 2015-10-14
      • 2014-04-11
      相关资源
      最近更新 更多