Search code examples
phplaravelpaypalpayment-gatewaylaravel-api

Laravel Paypal Apis Difference


I have worked on Paypal Payment Gateway Integration Projects in Laravel project. I mostly used Paypal/Paypal-php-sdk package. Here

But I came to know about srmklive/laravel-paypal package which looks more easier. Here.

I think above two payment Apis are working slightly different. First of all, I took api keys from different places in Paypal account.

In Php-paypal-sdk package, I got two API keys, Paypal Client ID and Paypal Secret Key. And in srmklive/laravel-paypal package, I got three API keys, API username, API password, API Certificate Key.

Can anyone have better knowledge about this?


Solution

  • However I noticed there also appear to be /v2/ endpoints, as found here: https://developer.paypal.com/docs/api/orders/v2/ . I'm not sure why this package uses the v1 version; I couldnt find much information about it.


    As quoted in the readme https://github.com/srmklive/laravel-paypal:

    Currently only PayPal Express Checkout API Is Supported.

    So you're probably better off using the first package. However I do remember that the APIs are not interchangeable, i.e. not all functions are implemented in both APIs. I remember vaguely something about recurring payments not available in one or the other.

    Another reason you'd also want to use the first package is because it is a 1st party package (created by PayPal), so it's probably more complete and closer to the source.