Reputation: 705
i have to integrate paypal payment gateway in php and iam in a state of confusion of selecting which method i have to choose.
I have gone through paypal developers documentation and found two methods.
1) REST API 2) Classic API
In classic apis there are still lot other options.
I have to build a website with payment feature for a client in US and no other country will be using this website.
So which option will be best suitable and on what scenario i have to select REST API and Classic API.
Upvotes: 1
Views: 341
Reputation: 1671
PayPal Classic and REST API
Classic API
Request and response payloads are formatted as NVP and SOAP.
Official PayPal SDK support for Express Checkout available with the PayPal Merchant SDK for .NET (GitHub | NuGet)
REST API
Request and response payloads are formatted as JSON
Official PayPal SDK support available with the PayPal .NET SDK (GitHub | NuGet)
The PayPal Name-Value Pair API (NVP API) enables you to leverage the functionality of the PayPal API by simply sending an HTTP request to PayPal and specifying request parameters using name-value pairs. The NVP API is a lightweight alternative to the PayPal SOAP API and provides access to the same set of functionality as the SOAP API.
A few points to consider with respect to Classic API vs. REST API:
Classic API is not going to be deprecated any time soon. You can use Classic API.
Moreover REST API does not support many variables/parameters that work in Classic API.
REST API can be used for both credit card and PayPal payments (express checkout architecture).
Note: The REST Apis, they support both direct credit card and express checkout depending on which funding instrument (CC vs PayPal) you pass in the pay request.
Upvotes: 3