I'm trying to set up PayPal login on a website, and used the custom button generator on the PayPal website to make the login button:
<div id="proceed-to-confirmation-page-link" class="text-right">
<span id="lippButton"></span>
</div>
<script src='https://www.paypalobjects.com/js/external/api.js'></script>
<script>
paypal.use(['login'], function (login) {
login.render({
"appid": "<MY APP ID>",
"authend": "sandbox",
"scopes": "openid profile address",
"containerid": "lippButton",
"locale": "en-us",
"text": "Login to PayPal to order",
"redirect_uri": "<MyRedirectURI>"
});
});
</script>
I have verified that the appid and redirect_uri are correct. I have tried both http://localhost:####/myredirecturi and http://www.myproductionsite.com/myredirecturl. I have added both of these return urls on developer.paypal.com, and waited three hours or more.
No matter what I do, I get the error message: Sorry about that Looks like this action is not supported. Please return and report this error so that we can support it in the future. (invalid client_id or redirect_uri)
I understand what the error message is saying, but I have triple-checked that these are correct. What am I missing?
I read PayPal's documentation, but it is woefully inadequate -- it explains what's supposed to happen, but gives hardly any detail about how the authorization code is supposed to be returned back to my site. If you can point me to further documentation, I would be very grateful.