简体   繁体   中英

Omnipay - Use Paypal Express Checkout Laravel

I recently followed this tutorial to create my own shopping cart for a little web-shop I'm creating. Now for about 4 hours, I'm searching for something that integrates nice into laravel and is easy to implement and use in Laravel 5.3.

I want to offer Paypal Express Checkout as Payment Method. But in the docs (readme file) of Omnipay I can't find things how to implement it really in the end.

So what I want is just a checkout button, when clicking on it, user is redirected to paypal, can see the products he buys and the endprice and can simply login and pay and gets redirected back to my page with success information like "Thanks for billing". I already signed up for a buyer and seller PayPal Sandbox accont to test everything first.

So how can I implement Omnipay Paypal to work?

Can't find anything...

I recommend that you use PayPal REST rather than PayPal Express. The API is more complete and there is documentation in the docblocks of the various classes as to how to create payments etc.

So for example if you have a look at the omnipay-paypal code there is a RestGateway.php class. In the docblocks (headers) of that class there is a full section on how to create a purchase request and send it through to PayPal, along with examples on how to redirect the customer to PayPal to pay and then how to handle the customer landing back on your site.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM