【发布时间】:2021-10-28 00:21:37
【问题描述】:
我正在尝试为我的 laravel 网店使用 Paypal Payouts API。使用沙盒时一切正常,但现在我切换到“实时”错误{"error":"invalid_client","error_description":"Client Authentication failed"} 出现。在我研究期间,我发现问题可能是应用程序仍处于沙盒模式。但是,我没有找到如何更改模式。也许这也可能是一个不同的问题。
这是我的代码:
$body= json_decode(
'{
"sender_batch_header":
{
"email_subject": "payout"
},
"items": [
{
"recipient_type": "EMAIL",
"receiver": "'.$email.'",
"note": "Your payout",
"sender_item_id": "payout",
"amount":
{
"currency": "'.$currency.'",
"value": "'.$amount.'"
}
}]
}',
true);
$request2 = new PayoutsPostRequest();
$request2->body = $body;
$client = PayPalClient::client();
$response2 = $client->execute($request2);
【问题讨论】:
标签: php laravel api paypal paypal-sandbox