The following error occurred while capturing an authorized payment after creating a subscription in
PAYPAL. If anyone knows why this is happening or has any solution, please reply.
Code to capture payments given a subscription ID. The content given below contains errors.
$provider = new PayPalClient; $provider->getAccessToken(); $response = $provider->captureSubscriptionPayment($request->input('subscription_id'), 'capturing payment', (float)$package->price);
mistake:-
`{ "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 that after creating products, plans and subscriptions through the API, these created products, plans and subscriptions are not visible in the dashboard (sandbox Paypal account). But when retrieving via api I get all the details. Please tell me why this is happening or where I can see this.
ps: I'm using the https://srmklive.github.io/laravel-paypal/docs.html
api to create products/plans/subscriptions.
P粉7262346482024-03-30 10:44:23
PayPal subscriptions are automatically billed based on the plan_id and/or billing_cycles of the overriding plan object when the subscription is created. That's what subscriptions are for.
When automatic payments are not missed, there are no outstanding balances to settle. Payments cannot be captured manually when there is no outstanding balance to be billed.