Braintree托管付款不起作用? [英] Braintree escrow payment not working?

查看:99
本文介绍了Braintree托管付款不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在沙盒帐户中测试Braintree第三方付款.下面是我编写的代码.

I am testing braintree ecrow payment in sandbox account . Below is the code I have written.

//Set the Configuration
Braintree_Configuration::environment($config['mode']);
                Braintree_Configuration::merchantId($config['merchant_id']);
                Braintree_Configuration::publicKey($config['public_key']);
                Braintree_Configuration::privateKey($config['private_key']);
    $result = Braintree_Transaction::sale(
      [
    'amount' => '100.00',
     'merchantAccountId' => 'test',
     'creditCard' => [
      'number' => '5105105105105100',
          'expirationDate' => '05/16'
    ],
    'options' => [
          'submitForSettlement' => true,
          'holdInEscrow' => true,
        ],
        'serviceFeeAmount' => "10.00"
    ]

);
if ($result->success) {
    print_r("success!: " . $result->transaction->id);

    print_r("success!: " . $result->transaction->escrowStatus);
    print_r($result->transaction->serviceFeeAmount);
    $escow = Braintree_Transaction::holdInEscrow($result->transaction->id);
 } else if ($result->transaction) {
    print_r("Error processing transaction:");
    print_r("\n  code: " . $result->transaction->processorResponseCode);
    print_r("\n  text: " . $result->transaction->processorResponseText);
} else {
    print_r("Validation errors: \n");

    print_r($result->errors->deepAll());
}

以下代码引发如下验证错误.

The following code throws validation errors as below.

Validation errors: Array ( [0] => Braintree_Error_Validation Object ( [_attribute:Braintree_Error_Validation:private] => serviceFeeAmount [_code:Braintree_Error_Validation:private] => 91557 [_message:Braintree_Error_Validation:private] => Service fee not supported on master merchant account. ) [1] => Braintree_Error_Validation Object ( [_attribute:Braintree_Error_Validation:private] => base [_code:Braintree_Error_Validation:private] => 91560 [_message:Braintree_Error_Validation:private] => Transaction could not be held in escrow. ) )

但是我使用的商人帐户ID是我手动创建的子商人ID.任何帮助的人都非常感谢.预先感谢.

But the merchantAccountId I have used is sub merchant id which I have created manually. Anyone with any help much appreciated. Thanks in advance .

推荐答案

已解决!

由于Marketplace仅在美国受支持,并且您在美国境外注册了沙盒,因此您的沙盒不是Marketplace帐户.如果您是为集成中的美国商人工作的开发人员,则需要注册一个美国沙箱帐户.您可以在我们的网站上执行此操作,方法是使用页面左下方的下拉菜单选择美国作为您的国家.然后,您应该可以单击尝试沙箱"按钮,并注册启用了Marketplace功能的新沙箱帐户.这应该允许您使用主商人帐户创建子商人帐户,如果按照我提供的说明创建新的沙箱,该帐户将存在.有了Marketplace沙箱后,您的默认商家帐户也将成为您的主商家帐户.

Because Marketplace is only supported in the US, and you signed up for your sandbox outside of the US, your sandbox isn't a Marketplace account. If you are a developer working for a US based merchant on an integration, you will need to signup for a US sandbox account. You can do this on our website by selecting United States as your country using the drop down menu on the bottom left of the page. You should then be able to click the Try the Sandbox button and sign up for a new sandbox account with Marketplace features enabled. This should allow you to create sub-merchant accounts using a master merchant account, which will exist if a new sandbox is created following the directions I've supplied. Once you have a Marketplace sandbox, your default merchant account will also be your Master Merchant account.

这篇关于Braintree托管付款不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆