Laravel Paypal Server Side REST API integration
Blu94
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Oct-08-2017
05:52 PM
I'm using laravel building a shopping cart, but i have difficulties on integrating,
What should the CREATE_URL return?
payment: function() { // Set up a url on your server to create the payment var CREATE_URL = '/demo/checkout/api/paypal/payment/create/'; // Make a call to your server to set up the payment return paypal.request.post(CREATE_URL) .then(function(res) { return res.paymentID; }); },
A json array? or any other thing? is there any proper example that my Controller should return?
and
// onAuthorize() is called when the buyer approves the payment onAuthorize: function(data, actions) { // Set up a url on your server to execute the payment var EXECUTE_URL = '/demo/checkout/api/paypal/payment/execute/'; // Set up the data you need to pass to your server var data = { paymentID: data.paymentID, payerID: data.payerID }; // Make a call to your server to execute the payment return paypal.request.post(EXECUTE_URL, data) .then(function (res) { window.alert('Payment Complete!'); }); }
What should the EXECUTE_URL should return?
1 REPLY 1
Quandary
Advisor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct-09-2017
07:13 AM
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- How to used Chain Adaptive paymnet in Android in About Business
- Microsoft .net SDK for connecting to PayPal PayFlow Pro gateway in About Payments
- How to accept recurring payment using Braintree SDK? in About Payments
- Help! 500 error for nearly 6 weeks! in Getting started!
- Help to integrate server-side REST on my website in Getting started!