The docs relating to actions.payment.execute() need updating.
Both of these pages have example code showing the use of actions.payment.execute(). The first has two mentions, the second five mentions.
None of the examples show that actions.payment.execute() resolves with a payment object!
Should be something like:
return actions.payment.execute().then(function (paymentDetails) {
// use paymentDetails to obtain the transaction id and other info
// Show a confirmation message to the buyer
window.alert('Thank you for your purchase!');
});
This relates to my issue https://github.com/paypal/paypal-checkout/issues/831 which has cost me lots of time, where I've been trying to use actions.payment.get() to obtain the payment details, but this call seems to fail in the live environment (works in the sandbox).
Oh man, @stephen-last you are the best! Thanks, I have already spent 6h on it. It was working last month, and now for some reason I was getting Permission_Denied. It is working again with your hint!
Thanks again.
Here some more details, see PayPal Checkout API.
@wchiquito Thank you, that is indeed what I would've needed.
First, I don't think that page is linked to from the main README.md, which is probably why I missed it.
Second, the two pages I mention in this issue which talk about actions.payment.execute() still need updating.
So I would argue that those two pages need updating, but also the main readme in this repo needs a link to the docs in this repo, which actually look very well written.
Thanks for the thread. We're actually spending a good amount of time revamping the docs on developer.paypal.com, and moving all docs out from github to there. So watch this space!
Fixed for the upcoming beta docs for the new version of this sdk. Closing this issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.