node.js - Return url doesn't work with PayPal and NodeJS -
After
my return URL paypi-rest-sdk and is not working with NodeJS.
The page after payment:
should have more pages:
var payment = {"intent ":" Sale "," payer ": {" PAYMENT_METHOD ":" paypal "}," redirect_urls ": {" return_url ": paypalConfigs.returnUrl," cancel_url ": paypalConfigs.cancelUrl + request.user.id}," Lane PayPal.payment.create (payment, function (error, error): [{"total": total, "currency": "EUR"}, "description": "command print print" Payment) {if (error) {console.log (error);} else {if (payment.payer.payment_method === "paypal ') {request.session.paymentId = payment.id; to redirectUrl; I = 0; I & lt; payment.links.length; i ++) {var link = payment.links [i], a Ghar (link.method === "redirect ') {RedirectUrl = link.href;}} response.redirect (redirectUrl);}}});
Try making a payment using an developer.paypal.com/webapps/developer/docs/information/direct/aa??or=.just sending a curl request If you can do this and redirection can work, you can make it an issue with the settings or credentials of your account and that the return URL is formatted correctly . Again, tries to sample from github.com/paypal/rest-api-sdk-nodejs/samples, so samples are so likely to work with your app.
The suggestion of Ishaan may be the issue here too.
Comments
Post a Comment