Paypal checkout does not have IPN feature
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am looking at PayPal Checkout as described at Sample code for PayPal Checkout. There are only 2 JavaScript methods involved with this form of PayPal payment page, which are createOrder and onApprove.
I was expecting a way of specifying IPN which is easily available with PayPal Standard button.
Question
Is IPN feature available in PayPal Checkout and if no, then what would be the best way of implementing something like IPN?
I am thinking of using sample code as below to mimic IPN feature functionality.
onApprove: function(data, actions) {
return actions.order.capture().then(function(details) {
// Show a success message to the buyer
//alert('Transaction completed by ' + details.payer.name.given_name + '!');
//IPN implementation as below
//Instead of showing a message to the buyer, redirect to a success page
//and pass query string variables to pass data from payment page top success page
window.location = "https://www.somesitexyzabc.com/success?s=1&d=abc";
});
- Labels:
-
Express Checkout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If anyone facing same issue i have found the solution which is below.
IPN is very old. PayPal Checkout with Orders v2 doesn't use IPN. There's no purpose for it.
To record transactions on your server, do the capture on your server.
I think you'll need two routes, one for 'Create Order' and one for 'Capture Order', documented here: https://developer.paypal.com/docs/business/checkout/server-side-api-calls/#server-side-api-calls
Pair your two routes with the following approval code: https://developer.paypal.com/demo/checkout/#/pattern/server
When a capture is successful within your server, do whatever you need to do with the information you have before returning the JSON to the approve function.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Customising Paypal Checkout Button in PayPal Payments Standard
- SetExpressCheckout 10003 error with ITEMCATEGORY=Digital in NVP/SOAP APIs
- Paypal express checkout, payment they error "Sorry, something went wrong. Please try again." in PayPal Payments Standard
- Need help to integrate PayPal Checkout (PPCP) with OpenCart? in PayPal Upgrade Community
- Add Others data in SDKs