嗨,我正在使用braintree(braintree / braintree_php“:” 4.5.0)。我已经在网络中实现了3dsecure。它工作正常。我需要使用PaymentMethodToken自动续订付款。下面的代码我已用于自动续订。
$trans = [
'amount' => "14.63",
'merchantAccountId' => "Vo**ID",
'paymentMethodToken' =>"token",
'transactionSource' => "recurring",
'customFields' => [
'client_id' => "id",
'service_id' => "id",
'invoice_id' => "id",
'action' => "autorenew",
'slots' => "15",
],
'options' => [
'submitForSettlement' => true,
'storeInVaultOnSuccess' => true,
'paypal' => [
'description' =>"Renew server",
]
]
];
$transaction = $gateway->transaction()->sale($trans);
运行此代码时,我得到以下错误
Util.php第59行中的授权:
上面的代码在用户输入要支付的信用卡信息时有效。这仅在我使用PaymentMethodToken进行付款以自动续费时才会出错。
参考:https://developers.braintreepayments.com/guides/paypal/server-side/php
答案 0 :(得分:0)