Am busy with a shopping app here so am having issues with the checkout of items, like when the user needs to make a payment, so how do I incorporate PayPal to my application? Because what am actually trying to do is to perform a payment with 3 steps: 1) Order Page with PayNow Button for users to click 2) PayPal Payment 3) Redirect to "Payment completed page"
I have tried to implement this: Paypal.Button.render({ //Configure environment env: 'production', // To test, set to `sandbox` payment: function () { // Set up the payment here, when the buyer clicks on the button }, onAuthorize: function (data, actions) { // Call your server to execute the payment if (error === 'INSTRUMENT_DECLINED') { actions.restart(); } } }, '#paypal-button');
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)