SDK/js redirect after payment
B33R
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-01-2021
04:56 PM
I have tried and looked everywhere with no solution found. On the verge of going to a simple button without any integration.
I have:
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
alert('Transaction completed by ' + details.payer.name.given_name + '!');
});
},
After transaction all I get is the alert and still on same page. How can I get it to redirect to a different page?
Thanx
Labels:
Login to Me Too
- Labels:
-
REST SDK
1 REPLY 1
B33R
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun-01-2021
05:14 PM
Can I do: alert('Transaction completed by ' + details.payer.name.given_name + '!' + 'window.location.href="mypage.php"');
???
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Add Others data in SDKs
- Button in PayPal Payments Standard
- Need help to integrate Advanced Checkout (PPCP) With WHMCS in PayPal Upgrade Community
- I want to implement subscription functionality. in REST APIs
- Shipping options are not appearing in my cart through link or button. in PayPal Payments Standard