在 PAYPAL 中创建订阅后捕获授权付款时出现以下错误。如果有人知道为什么会发生或有任何解决方案,请回复。
用于捕获给定订阅 ID 的付款的代码。下面给出的内容包含错误。
$provider = new PayPalClient;
$provider->getAccessToken();
$response = $provider->captureSubscriptionPayment($request->input('subscription_id'), 'capturing payment', (float)$package->price);
错误:-
`{
"name":"UNPROCESSABLE_ENTITY",
"message":"The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id":"2e3384fe1998b",
"details":[
{
"issue":"ZERO_OUTSTANDING_BALANCE",
"description":"Current outstanding balance should be greater than zero."
}
],
"links":[
{
"href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
"rel":"information_link","method":"GET"
}
]
}`
{
"name":"UNPROCESSABLE_ENTITY",
"message":"The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id":"b1c0f40b4e56b",
"details":[
{
"issue":"AMOUNT_GREATER_THAN_OUTSTANDING_BALANCE",
"description":"The new outstanding balance can not be greater than the current outstanding balance."
}
],
"links":[
{
"href":"https://developer.paypal.com/docs/api/v1/billing/subscriptions#UNPROCESSABLE_ENTITY",
"rel":"information_link","method":"GET"
}
]
}
另一个问题是,通过 API 创建产品、计划和订阅后,这些创建的产品、计划和订阅在仪表板(沙盒 Paypal 帐户)中不可见。但是当通过 api 检索时,我得到了所有详细信息。请告诉我为什么会发生或者在哪里可以看到这些。
ps:我正在使用 https://srmklive.github.io/laravel-paypal/docs.html api 来创建产品/计划/订阅。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PayPal 订阅会根据创建订阅时 plan_id 和/或覆盖计划对象的 billing_cycles 自动计费。这就是订阅的目的。
当自动付款没有被错过时,就没有未结余额需要结算。当没有未结余额需要计费时,无法手动捕获付款。