首页 > 解决方案 > 在 Braintree 中创建子商家账户会出现“主商家账户 ID 无效”错误

问题描述

$masterMerchantAccountId = $this->config->item('merchantId_sandbox');

$merchantAccountParams = [
    'individual' => [
        'firstName' => $inputData['firstName'], 
        'lastName' => $inputData['lastName'], 
        'email' => $merchantIndividualEmail,
        'dateOfBirth' => $inputData['dob'], 
        'address' => [
            'streetAddress' => $merchantIndividualAddress,
            'locality' => $merchantAccountLocality,
            'region' => $merchantAccountRegion,
            'postalCode' => $inputData['zipCode'],
        ]
    ],
    'funding' => [
        'descriptor' => $merchantFundDescriptor,
        'destination' => Braintree\MerchantAccount::FUNDING_DESTINATION_BANK,
        'accountNumber' => $merchantFundAccount,
        'routingNumber' => $merchantFundRoutingNo,
    ],
    'tosAccepted' => true,
    'masterMerchantAccountId' => $masterMerchantAccountId
];


$merchantAccountResponse = $gateway->merchantAccount()->create($merchantAccountParams);

我正在使用此代码通过 Braintree 沙箱创建子商家帐户,但我收到来自 Braintree 的错误。错误如下。

“主商户账号无效”

我该如何解决这个问题?

我想在我的主商户账户中做子商户账户,客户将向子商户付款。

通过正常工作的 Braintree 沙箱创建的客户。它没有给出错误,只有子商家帐户创建给出了错误。

标签: phpcodeigniterbraintree

解决方案


推荐阅读