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.
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.
Related
We need to create flexible billing plans for our customers, in which the timing and amount of the billing is flexible and should be determined by us. Just like a "utility bill" but with flexible charge date. Also, there's no purchasing involved upon agreeing of the customer, just his approval for us to charge his PayPal account.
After researching it we decided to go with "referenced transactions". I've read its documentation and the flow seems to be clear.
However, when I attempt to implement using PayPal's PHP REST SDK, I can't seem to find the methods that implement that flow, or some other description on how to achieve our needs using this SDK. For example, I can't find SetExpressCheckout in the PHP REST SDK.
Can anyone point out how we should implement our business needs as described above (1st paragraph) using the PHP REST SDK? I'm very aware of the rather good PayPal REST API documentation.
Thanks!
Unfortunately Reference Transaction is only available with the Classic APIs.
The only similar REST API is called "Future Payments". Unfortunately this API has only been implemented for the PayPal Mobile SDK. You cannot use it outside a native mobile app...
I'm afraid your only solution is to implement the PayPal Classic API with Reference Transaction.
I would like my PayPal express checkout integration, which uses the PHP Rest API SDK, to show the option 'pay using a debet or credit card' but that option is currently not showing.
'PayPal account optional' is on in the account settings, so that's not the problem.
I have figured out that for the classic API I would need to add the option
'SOLUTIONTYPE=Sole'
to the SetExpressCheckout call but the Rest API docs make no mention of this option and a code search through the SDK doesn't turn up any hits.
Does anyone know how to enable this option through the Rest API/Rest API PHP SDK?
Unfortunately, SOLUTIONTYPE is not supported in REST API as of now.
List of variables available in Web Experience
Everything does not look good with the Paypal APIs. Paypal Merchant API seems to be deprecated , but most of the examples and functionality is referring to Marchant SDK.For example take Recurring. REST API does not provide any example of Recurring Payments !
In what context this API is deprecated ? I am looking for recurring payments done for "Paypal Payments Advanced" account type.
If you are looking to implement Recurring Billing with PayPal Payments Advanced you'll want to look at the Payflow platform APIs. here is a good place to get started:
https://developer.paypal.com/docs/classic/products/recurring-billing/
I'm developing a shopping cart with both subscription and outright payments on Authorize.Net using PHP. The documentation is not language-specific so I checked the sample codes but none seems to have the answer.
QUESTION: How do we authorize and then capture funds later with Authorize.Net ARB and AIM?
Perspective A
ARB isn't supposed to be language specific, it is quite the opposite. ARB provides a SOAP or XML interface which allows any language/application that can communicate via SOAP or XML to post and receive responses to/from ARB.
I recommend SOAP over regular old XML; it is more strict and translates very well to OOP. You'll be most interested in PHP's SOAPClient. Use SoapClient to connect to the WSDL as described in Authorize.NET's ARB Guide on page 11: https://api.authorize.net/soap/v1/Service.asmx?WSDL
Perspective B
However, if you would like ready-made APIs in your language of choice (PHP), Authorize.NET has SDKs available for download and use. See http://developer.authorize.net/downloads/#mobile_sdks
Notice in the support table that PHP supports Automated Recurring Billing (ARB), Server Integration Method (SIM), and Advanced Integration Method (AIM). On that same downloads page, sample applications are available in your language of choice.
To AUTHORIZE immediately, and CAPTURE later
First, the AIM docs are located at http://developer.authorize.net/guides/AIM/wwhelp/wwhimpl/js/html/wwhelp.htm, and navigate to "Submitting Transactions" > "Credit Card Transaction Types" > "Authorization Only" and "Prior Authorization and Capture"
Perform a x_type=AUTH_ONLY
Then at a later date perform a x_type=PRIOR_AUTH_CAPTURE with a x_trans_id=$ID
Without reinventing the wheel, PHP sample code is available for download (free) at http://developer.authorize.net/resources/files/samplecode/php_aim.zip in regards to AIM.
Authorize.NET's API is well documented and they have plenty of sample code... that is if you know where to look.
Developer Account
Authorze.NET provides a free developer account and sandbox to play with for DPM, SIM and AIM. See http://developer.authorize.net/integration/fifteenminutes/ and sign up at https://developer.authorize.net/testaccount/.
Paypal Adaptive Payments Intro
Paypal API intro
What is the difference is between an API key and an Access Token? They both seem to work as "passwords" for the paypal communications.
I'm running the code on the paypal API intro(using curl in PHP, which I'm also just starting to understand), and I'm not sure how to get from that the the paypal adaptive payments stuff. I'm having trouble figuring out how I call "Adaptive Payments" in my code. Do I actually put that in there somewhere or is it implied when I call for multiple payments with one transaction?