For setting up a transaction between Paypal account to another Paypal account without user intervention/permission, I was planning to integrate Paypal Adaptive but had second thoughts due to a note on the Paypal's web page for Adaptive payments. The screen shot and link of the note attached below:
https://developer.paypal.com/docs/classic/adaptive-payments/integration-guide/APIntro/
Screenshot:
This got me to wondering whether Adaptive is a good choice for new integrations considering the limited release note or whether I would be able to make requests in a live account currently? (It works in sandbox account currently)
If yes, then should I be worried there may be some future update that would render my integration to not work?
If its not a good choice then what other alternatives does Paypal offer that are best suitable for Paypal account to account transaction?
Initially, I was actually trying to integrate PreApprove coupled with Pay API for automated transactions without user intervention/permission but used "DoReference" instead due to this note from Paypal.
Related
I integrated OmniPay in my project few days ago, and I wondered if there is any option coming with it to actually enable credit card payments.
https://github.com/thephpleague/omnipay
I want to understand how to enable the PayPal credit card payments (which do not require an paypal account) using it.
What PayPal API settings should I enable?
How can I code this?
Is there any option to do this using PayPal & PHP at all ?
I tried to document myself on this and I couldn't find any answer to this question. Neither on the https://github.com/thephpleague/omnipay nor on Stack.
The setting mentioned in comments, 'PayPal Account Optional' exists so you have the ability to only accept payments from people with an account (when set to 'No').
If set to 'Yes', payments without an account can be possible. But whether the option will be offered to a particular payer in a particular PayPal checkout attempt depends on very many factors, which you do not control.
The only way to have some guarantee of a guest method being offered is to show a credit card form on your own site, before the buyer reaches a PayPal.com page, using the black 'Debit or Credit Card' button that is part of the JS SDK. You can see an example demo here: https://developer.paypal.com/demo/checkout/#/pattern/server
That JS code used for payer approval can be paired with any backend to create and capture the order via API -- including Omnipay, which essentially acts as a proxy for the PayPal API. This JS replaces any redirect over to PayPal which you might be familiar with from oler legacy integrations; the JS SDK is a more modern way to get the payer's approval, via a small in-context window or open a credit card form iframe instead which is a better UX than redirecting away anyway.
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/
I am developing Express checkout with Merchant-SDK for classic API and I am experiencing some problems with guest paymens.
I have checked the PayPal Account Optional and I am manualy setting the SOLUTIONTYPE=Sole during setExpresCheckout.
However I am getting very inconsistent results (at some point I was able to use guest payment with PayPal Account Optional alone). Guest payment seems to work for only some states but they seem not to be always the same.
So I am wondering What else affects this? Where can I find some explanation?
Note: I am using shortened flow (useraction=commit) and setting the LOCALCODE. Right now I am also setting the LANDINGPAGE=Billing but It would be better for me to leave this on PayPal.
As for integration level, PayPal Account Optional (set as 'on') and SOLUTIONTYPE=Sole are the only 2 steps for you to configure. Nothing else you should do. Such guest checkout issue for Express Checkout is mainly based on customer/buyer side, including the network environment, funding source status, etc., PayPal has its own risk detection mechanism to judge whether or not your customer is suitable for guest checkout. This risk detection mechanism is very complicated to find its rule.
But if your PayPal account is based on U.S., you can go to the link below to upgrade your PayPal account to the Pro account, and then you can integrate PayPal Direct Payment which can fully use guest checkout.
https://www.paypal-business.com/paypal-pro
Whats the recommended way to do this with Paypal (i've heard they're a nightmare to deal with).
Ideally the user would sign up with credit card details and then i'd process the payments through their banks? Is that how it works? With API's?
Ideally the user would sign up with
credit card details and then i'd
process the payments through their
banks? Is that how it works?
No. In a correctly designed system you never have access to your user's credit card number. It's your payment processor (eg PayPal, MoneyBookers, FastSpring, etc.) that takes care of processing your customer's credit card.
So your customer is taken to the payment processor's site (on a page which can be customized to use your company's logo etc.) and then your payment processor warns you when a purchase a made (for example by calling a specific URL).
With API's?
Yup, PayPal (and MoneyBookers and things like FastSpring) offer APIs for several languages (like Java APIs).
PayPal has a dev environment on which you can test these kind of functionalities, so does MoneyBookers if I recall correctly (also note that sometimes the dev environments are a bit buggy and/or down).
PayPal offers APIs for processing payments. Typically, the user is taken off your page to login into paypal and then paypal calls back to your site with approval/shipping info. The whole point is for the user to shield their credit card info from your site, making things safer.* You can use either the NVP (name-value pair) or SOAP protocol for development. There are also 3rd party libraries to simplify integration.
Check out the API reference here to get an idea:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/howto_api_reference
*PayPal does offer a Direct Payment API which allows your site to take credit cards directly and use PayPal as the gateway:
https://www.paypal.com/cgi-bin/webscr?cmd=_dcc_hub-outside
I need to build web application where users can sell goods.
Each user should be able to get money directly on his PayPal account.
Can you suggest which PayPal service/payment method (or other payment system) it is better/safely to use in this case?
Thanks in advance
This is easily set up (if I read your requirements correctly). You would have to create your part of the system, but that's obvious.
The rest, specifically vendor payments, could be handled all by PayPal.
PayPal could process the orders into individual accounts. You would simply have to use the same IPN notification file for each Buy Link. This IPN notification file is what PayPal uses to notify an order has come. It does not matter that it may have come TO Suzie's or TO Bob's account.
So, your notification script gets the order -- Then, your internal system differentiates the vendor and ... that's it ;).
IPN is very simple too, and they've got nice templates in various languages to get you started.
I'm sure there are alternate ways to do it, but IPN is what I personally use, combined with a back-end system. I even have another vendor whose plug-in for my product I sell. Money goes directly into his PayPal account by simply changing the recipient email in the Buy URL (or form).
Any competent programmer should be able to handle this with ease. The proficiencies would be SQL/database experience and web coding (any language). That's about it. A non-programmer could probably even learn, though needs to be careful to sanitize the input to protect against SQL injection attacks.
You can use ExpressCheckout, this means that your sellers do not need tho have Pro accounts, but login and payment will occur in paypal's popup window. You can also use more advanced integration, but this might require the merchants to upgrade their account, and this might cost them money in every month.
You also need to collect API keys from merchants and store them in a very safe location, or collect the money yourself, and pay for the merchants using paypal's API code, but this will introduce additional (transfer) costs.
You will most likely have to write it from scratch. I mean, from some bare framework.