$result = Braintree_Transaction::sale(array(
'merchantAccountId' => 'merchantAccountId',
"amount" => '45.00',
"creditCard" => array(
"number" => 'creditcardnumber',
"cvv" => 'cvv',
"expirationMonth" => $_POST["cc_month"],
"expirationYear" => $_POST["cc_year"]
),
'serviceFeeAmount' => $service_amount,
"options" => array(
"submitForSettlement" => true
)
));
我正在使用Braintree API。在沙盒中我正在创建一个事务。 但交易没有发生。错误在下面给出。
ERROR! Service fee not supported on master merchant account.
但是,如果我评论下面的行。
'serviceFeeAmount' => $service_amount,
然后订购地点成功,我看不出收取多少交易费用。
我想订购服务费金额。问题是我不明白如何在Braintree上创建 SUB MERCHANT ACCOUNT 。一些答案是here和here给出但不理解。
答案 0 :(得分:0)
public virtual Task Save(String path)
{
if (NewWords.Any())
{
return FileManager.WriteDictionary(path, NewWords, true);
}
return Task.Delay(0);
}
答案 1 :(得分:0)
您已包含paymentMethodNonce
$result = Braintree_Transaction::sale
([
'amount' => '10.00',
'paymentMethodNonce' => 'fake-valid-nonce',
'options' => ['submitForSettlement' => True]
]);
if ($result->success)
{
print_r("success!;".$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 error:\n");
}