cancel
Showing results for 
Search instead for 
Did you mean: 

How to redirect user with ID after button purchase?

Options
Chris455
Contributor
Posted on

How do you get immediately confirmation after someone submits a payment to you via the Javascript Paypal button?

 

I'm using the "paypal.Buttons()" Javascript to render a button to purchase a subscription.

 

By default, this creates a popup that allows the user to submit a payment. It doesn't appear to provide any feedback or callback that my own site can use to acknowledge receipt of payment.

 

Therefore, I'm using the REST API to poll for payments, and activate subscriptions once it see the payment. Unfortunately, Paypal's RESt API is so slow and inefficient that it can take 6 hours for transactions to appear via the API.

 

Is there any way to use the paypal.Buttons() Javascript to get it to redirect the user to a specific custom "success" or call a Javascript function on the origin page after the payment successfully completes? That way I can trigger my own custom logic immediately, and not leave my customers waiting for hours.

Haven't Found your Answer?

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