SDK/js redirect after payment

B33R
Contributor
Contributor

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

Login to Me Too
1 REPLY 1

B33R
Contributor
Contributor

Can I do: alert('Transaction completed by ' + details.payer.name.given_name + '!' + 'window.location.href="mypage.php"');

 

???

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.