Setting up automatic recurring subscriptions via Woocommerce and Paypal. I am currently setting this up for a client and have run into some issues regarding the payment capture, I am currently testing through sandbox and have verified all keys are correct. I have went through a lot of support and documentation and cannot find a solution to this can you please advise? Is there anything i need to setup with the REST API on woocommerce in order for this to work as intended? Woocommerce error: "Could not process order because it was not possible to save the payment. Order status changed from On hold to Failed."
Snippet from the debug log: "error":"invalid_client","error_description":"Client Authentication failed"
Response Body: {"name":"INVALID_RESOURCE_ID","message":"Resource id is invalid","debug_id":"558dce5b3c3df","information_link":"https://developer.paypal.com/docs/api/webhooks/#errors","details":[],"links":[]}
2022-03-08T08:53:19+00:00 DEBUG POST https://api.sandbox.paypal.com/v1/notifications/webhooks
Request Body: {"url":"https:\/\/scottishattachmentinaction.org\/wp-json\/paypal\/v1\/incoming","event_types":[{"name":"CHECKOUT.ORDER.APPROVED"},{"name":"CHECKOUT.ORDER.COMPLETED"},{"name":"PAYMENT.CAPTURE.REFUNDED"},{"name":"PAYMENT.CAPTURE.REVERSED"},{"name":"PAYMENT.ORDER.CANCELLED"},{"name":"PAYMENT.CAPTURE.DENIED"},{"name":"PAYMENT.CAPTURE.COMPLETED"}]}
Response Debug ID: cd355a623cea1
Response: Array
(
[code] => 201
[message] => Created
)
2022-03-08T08:53:19+00:00 INFO Webhooks subscribed.
2022-03-08T08:53:19+00:00 DEBUG POST https://api.sandbox.paypal.com/v1/oauth2/token?grant_type=client_credentials
Response Debug ID: a241018f9355d
Response: Array
(
[code] => 401
[message] => Unauthorized
)
Response Body: {"error":"invalid_client","error_description":"Client Authentication failed"}
2022-03-08T08:53:19+00:00 WARNING Could not create token.
2022-03-08T08:53:20+00:00 DEBUG POST https://api.sandbox.paypal.com/v1/oauth2/token?grant_type=client_credentials
Response Debug ID: cce91d2daa711
Response: Array
(
[code] => 401
[message] => Unauthorized
)
Response Body: {"error":"invalid_client","error_description":"Client Authentication failed"}
2022-03-08T08:53:20+00:00 WARNING Could not create token.
2022-03-08T08:54:44+00:00 DEBUG POST https://api.paypal.com/v1/oauth2/token?grant_type=client_credentials
Response Debug ID: be1ea6aa12a17
Response: Array
(
[code] => 200
[message] => OK
Thank you, Darren
... View more