Closed aggelito closed 6 years ago
What's the redirect url? It should be the one matching to the one listed in your app.
Following the sample code, the "$redirectUrl" is my example in the bottom, https://www.sandbox.paypal.com/signin/authorize?client_id=my_client_id&response_type=code&scope=openid+email&redirect_uri=http%3A%2F%2Fmysite.ci%2Fcustomer%2Flinkpaypal%3Fsuccess%3Dtrue.
And the "$baseUrl" is the url included as a get-variable "redirect_url", which decoded is http://mysite.ci/customer/linkpaypal?success=true. I have tried adding this to the app "Return URL"-list in my app (as you do for payments) but still not working
Does https://github.com/paypal/PayPal-PHP-SDK/issues/894 help with your situation?
General information
Issue description
I want the customer to be able to log into PayPal from our site but following the SDK sample code to obtain user's consent (Sample code).
When I redirect to the url provided by the SDK, PayPal shows an empty site saying "An error has occurred. It seems that this action is not supported. Report this error so we can help with it in the future. (invalid client_id or redirect_uri)".
I'm already using the SDK for payments and refunds and that works so shouldn't be incorrect client_id.
I've checked my rest API application in the developers console and activated "Log in with PayPal" and ticked all the user information request options just in case but the problem remains for both sandbox and live mode.
Example url: (https://www.sandbox.paypal.com/signin/authorize?client_id=my_client_id&response_type=code&scope=openid+email&redirect_uri=http%3A%2F%2Fmysite.ci%2Fcustomer%2Flinkpaypal%3Fsuccess%3Dtrue)
Anyone knows what could be causing this problem?