I am integrating Paypal into a website I am creating. I don't need a lot of the functionality that comes with the API's and I am supporting multiple gateways. I have created my own class to handle the other gateways, however I cannot find out how to send the information. For example:
For authorize, they receive an XML object formatted in a specific way. I gather the required user information, create my own XML object with the proper information and formatting, and send this to Authorize using a curl method.
when trying to decipher the Paypal API I found it confusing with a large amount of dependencies. Is there some place that has the information I am looking for, or has someone already created their own Paypal kit and would point me in the right direction?
Thanks!!
I found what I was looking for a while back and have been meaning to answer this question in case others were having the same issue.
what you are looking for is the paypal NVP API.
https://developer.paypal.com/docs/classic/api/NVPAPIOverview/
There is also a soap style api as well.
specifically I was interested in the following operations:
DoDirectPayment
SetRecurringPaymentsProfile
CreateRecurringPaymentsProfile
and for express checkout:
SetExpressCheckout
SetExpressCheckoutRecurring
GetExpressCheckoutDetails
DoExpressCheckoutPayment
if you google paypal nvp insert operation here that will take you to a development page that will give you key value info.
Hope this helps anyone who was in my shoes.
Related
I've searched everywhere in order to find an answer but have not found one. All i know is that in order to do it you need paypal adaptive payments i think (if you know another way let me know)
What im trying to do is make it so that when a user purchases a product 15% goes to one paypal account and the rest goes to the authors paypal account but have done loads of searching and have found nothing
PayPalAP::setAuth('my_api_username', 'my_api_password', 'my_api_signature');
// I'm not passing in an environment, which will default it to sandbox mode.
$options = array(
'cancelUrl' => 'http://my_cancel_url',
'returnUrl' => 'http://my_return_url',
'currencyCode' => 'USD',
'receiverEmailArray' => array('receiver_of_funds'),
'receiverAmountArray' => array('15'),
'ipnNotificationUrl' => 'http://my_ipn_listener_url'
);
$respo
Adaptive Payments would be the way with paypal ... But I would recommend using stripe for this kind of transaction. The API allows better control and was build for this kind of complexity. If you can replace paypal with stripe, do it. If not, you will need to contact paypal. They made this feature restricted.
Patrick Simard is correct that this feature is now restricted, but assuming you have received authorization from PayPal to use the adaptive API, then you have two option:
Chained Payments
Parallel Payments
Both will achieve the same end game, but which one you choose is ultimately up to you.
Chained Payments
With Chained Payments, you set up a payment option where the initial payment goes into one account, a portion is removed/left in that account, and then the rest is sent on to a second account.
Parallel Payments
Parallel Payments will produce a similar result, but rather than all of the funds being sent to one account first before being sent onwards, the money is instead sent to two different accounts immediately. (This option actually supports up to 6 accounts being paid at once.)
Examples of the HTTP I/O can be found on the linked documentation pages. You will simply need to set up cURL requests to create these. (Which should be a fairly straight forward process.)
To reiterate, though, heed the following notice from PayPal about using this API:
Important: Adaptive Payments is now a limited release product. It is restricted to select partners for approved use cases and should not be used for new integrations without guidance from PayPal.
This warning can be found at the top of documentation pages for Adaptive Pay.
Edit: In response to your comment, I have located a possible alternative that does not rely on the Adaptive Payments API, and seemingly does not require special permission from PayPal to use.
The option I found is to use Express Checkout with Parallel Payments. This utilizes the PayPal Name-Value Pair (NVP) and SOAP API. Some details on this option can found on this documentation page: https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECParallelPayments/
As a caution, though, that page seems to indicate that the NVP and SOAP API is deprecated. I am unsure what they are replacing it with, but at this time, it does still appear to be an opportunity, although you may have to update your code at some point when they release their replacement for NVP & SOAP and/or when they remove NVP & SOAP.
There is also a full list of SDKs, which includes an Express Checkout SDK written in PHP for the NVP & SOAP API: https://developer.paypal.com/docs/classic/api/nvpsoap-sdks/
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'm trying to understand if it's convenient for a client to switch from Paypal Express Checkout to Braintree, but I find the latter way too complicated and hard to understand (terrible docs, only reference is good).
Documentation lacks COMPLETE WORKING examples, with all the pages needed where you can just change API credentials and everything works. That is fundamental for any system/API to get quickly the logic and workflow.
I basically currently have a checkout system with all my customer's data and a basket_id, with a form a redirect customer to Paypal passing all these data, and once the customer completes the payment Paypal calls back a URL on my server sending back all the data I sent plus transaction id, and this way I mark that basket_id/order as paid and assign to it a transaction. And no sensitive payment data are typed or pass through our server/network.
How to do all this on Braintree js+php? Any full and complete sandbox working example where I can just change my credentials and have working code to understand the logics? Is much faster than reading the honestly quite confusing documentation.
Thanks!
I'm looking at setting up a PayPal chained payment request but I'm struggling right at the start (doesn't look good) haha.
Basically I'm using these API docs: https://developer.paypal.com/webapps/developer/docs/classic/adaptive-payments/ht_ap-delayedChainedPayment-curl-etc/
I'm just wondering where I get the APi details from? With the .developer console you don't get the signature or at least I can't find it.
Can anyone give me any examples of this?
Thanks
You can use this link to easily obtain API user, pass, and signature.
You might also be interested in taking a look at my PHP class library for PayPal. It will make the API calls very simple for you.
I'm looking for a way to build a web application using paypal payments standard. I'd like the user to get redirected to paypal, then fill out their information, and upon completion, add a value in our database saying that they successfully paid. I haven't found a solution or answer to this.
I found this thread for RoR, but didn't find anything for PHP
Paypal Website Payments Standard with a Ruby/Rails application
You can see instructions for a Payment Data Transfer at PayPal's site. Basically, you post the transaction amount and an ID token to their site, the customer pays on paypal.com, and then they're sent back to a pre-defined URL on your site with the transaction details.
I used the NVP API to do that.