Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
trying to set third-party payee fails with status 400, permission denied #464
When payee for the REST API is set to an email address other than the app's owner, the execute step fails with a status of 400 and a message "contingency":"PERMISSION_DENIED".
According to this: https://devblog.paypal.com/setting-payee/
The first button works, the second doesn't; it returns a status 400 and a JSON message:
(This form is asking me for "the
Console logs -- the error line is highlighted.
Steps to reproduce
This minimal code demonstrates the issue. The first button, where the payee is the app's owner, works fine. The second button, identical except that it sets a third party payee, fails on the execute step. giving the 400 response code.
Seen in Chromium Version 50.0.2661.94 on Fedora.
Looks like this may be an internal issue with the execute api, rather than a specific problem with checkout.js. I'm raising an issue with the relevant team, I'll update here when it gets some traction.
In the short term, if you need to be unblocked, you may want to try making the execute call using a server-side call: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/server-side-REST-integration/
Tried to work around by doing the execute step from the server side, but still get errors from within the PHP SDK on calling execute. A 401 rather than a 400 but still, no joy:
This is the code:
Exactly the same problem here guys.
EDIT: with the PHP SDK it works, but the JS bug is still there.
Do we use this library to get a payment token, pass that to our own server, and our server makes a call? Or do we make the call straight from the client to paypal rest api?
What's the best way to move forward without any compliance headaches?
This was referenced
Jun 27, 2018
We've been using this to set up the payment on the client side, but to actually execute it we set up a small script on our server-side using the with the PHP SDK, as suggested above. It is definitely uglier than I'd like but it's working for us. Michael St Clair <firstname.lastname@example.org> writes:…
Is there an update on how to use payee with this or is there an alternative PayPal product I can use to accept payments on behalf of others? -- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: #464 (comment)
We've run into this issue as well.
We use it as part of our embeddable app for users to collect payments, and right now, the users can't do anything at all.
We're using the frontend checkout lib.
Our users come to use complaining, no payments can be made, ever.
What's the deal with this?
I'm afraid to say at this point this issue is probably a 'wontfix'. There's a new api being introduced which fill facilitate payments, and not have this issue. This is mostly outside of the control of our sdk team.
Please for now do not rely on client side execute() if you're using