Getting below error when Capturing authorized payment just after creating subscription in PAYPAL
. if anyone have idea about why it's happening or got any solution, please reply.
code for capturing the payment of given subscription id. which giving below included error.
$provider = new PayPalClient;
$provider->getAccessToken();
$response = $provider->captureSubscriptionPayment($request->input('subscription_id'), 'capturing payment', (float)$package->price);
Error:-
`{
"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"
}
]
}
Another issue is, after creating products, plans & subscription through api, these created products, plans & subscriptions are not visible in dashboard(sandbox paypal account). but when retrieving through api i'm getting all the details. kindly tell why its happening or where to see these.
ps: i'm using https://srmklive.github.io/laravel-paypal/docs.html
api for creating products/plans/subscriptions.
PayPal Subscriptions bill automatically, according to the billing_cycles of the plan_id and/or override plan object when the subscription is created. That is the purpose of subscriptions.
When automatic payments have not been missed, there is no outstanding balance to bill. When there is no outstanding balance to bill, payment cannot be captured manually.