I am new to PayPal and i want to know which is batter way to implement PayPal, SOAP or NVP API.
And what is the major difference between these two???
I am new to PayPal and i want to know which is batter way to implement PayPal, SOAP or NVP API.
And what is the major difference between these two???
I would recommend using the NVP (Name-value pair, basically POST with data) API over the SOAP API. NVP should be significantly lighter weight than SOAP. There are a few questions already on SO that complain about SOAP. I just was trying to figure out which to use and came upon those. Hope that helps.
Also, here's how PayPal describes the NVP API:
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.
Emphasis my own.
It's better to use the PayPal SOAP API (as i have completely implemented this). donut is correct in saying that NVP is lightweight. But there are 2 main advantages of using SOAP:
I recommend SOAP over NVP, but it also depends upon usage.
I simply think that SOAP is better for a lot of new programmers, who will be more confortable with it cause it s object oriented. But it is quite difficult to find and understand a logic in APIs when you did not create the objects by yourself in it ! NVP is structural so you can create your own objects in your scripts. This version is by more and more extensible !!!
NVP (Name-Value-Pair) is commonly referred to as REST (REpresentational State Transfer) protocol where you send name value pairs over HTTP in a similar manner to how an HTML form sends information to a server. I prefer NVP/REST since it follows the KISS Principle (Keep It Simple Sir) which is the philosophy that simple systems are easier to build and require less time and effort to maintain than more complicated systems. This is why in most situations I would recommend REST (NVP) over SOAP.
However, in situations where you require more security and/or are integrating with an existing software package or library, SOAP might be an appropriate solution depending on the circumstance.
© 2022 - 2024 — McMap. All rights reserved.