I just implemented this: PHP PayPalCheckoutSdk:
https://github.com/paypal/Checkout-PHP-SDK
It redirects visitor to PayPal login and then he pays.
But my customer wants clients to pay using credit card and only optionally use PayPal login.
I've read there's another API that uses Javascript called Smart Payments (or Express Checkout, i have no clue...):
https://developer.paypal.com/docs/checkout/integrate/
https://developer.paypal.com/demo/checkout/#/pattern/server
Visitor can choose to pay using Credit Card, and this works as expected, but this is done using Javascript and so customer inputs the Credit Card information inside the actual eshop website!
Is it possible to redirect the customer to PayPal, so that he inputs the CC information there?
For Credit Card payments PayPal suggests using braintreegateway.com, which seems like a separate company. It has a separate API keys and administration (transaction list) meaning the transactions are separate from PayPal account!
A lot to unpack here.
The simplest way to accept credit cards is Set up standard payments -- which can be implemented with or without a server-side SDK to create and capture the order. Creating and capturing the order on a server is much more robust for order management.
The client-side JS portion of it provides a black "Debit or Credit Card" button, which can typically be used without any login.
Other, different services for processing credit cards that are also offered by PayPal are Advanced Credit and Debit Card Payments, and the Braintree Direct Gateway. These require more work to integrate, and the business account needs to be approved for the service to be set up and available to it.
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 am looking for information on how large resellers collect payments and pay the people who sell on their site. (e.g. Redbubble.com, a company that pays artists a commission for their work)
Specifically, I am looking for different solutions that cover a few key functions at minimal cost (like Paypal fees)
Ability to take payment from credit cards and paypal (others a benefit)
Track sales for each merchant as payments are processing
Collect payments in central account
Payout all processed payments on a monthly basis
P.S. I imagine there are a few ways to do this, I am hoping to gain some insight on what solutions have been proven.
P.P.S. This is not a technology specific question. Whatever APIs or third party solutions you know of are fair game.
Thanks for your knowledge!
Try PayPal adaptive payments.
Paypal Adaptive payments
You can also try Stripe to collect funds to one account and to trasfer them to third party acccounts but this only works in the US.
Stripe Payments
You could use the Adaptive Payments API and that would allow you to split the payments up among multiple receivers in a single transaction in real-time. If you go that route the API calls that you'd be interested in are...
Pay - This setups the actual payment and the receivers on the payment.
SetPaymentOptions - This allows you to provide more details like items, shipping, etc.
ExecutePayment - This actually processes the payment in the system after it's been setup with the previous calls.
PaymentDetails - This obtains details about a completed transaction.
Preapproval (possibly) - This allows you to get a Preapproval key for a user that will allow you to trigger payments on that users behalf at any time in the future with the use of the preapproval key.
PreapprovalDetails (if you use preapprovals) - This obtains details about an active preapproval profile.
To get all of that working in the live environment you'll need to submit an application through your PayPal developer account to obtain a Classic API App ID. For development on the sandbox there is a global App ID that can be used.
Another option would be to take payments on your site using any PayPal product like Payments Standard, Express Checkout, Payments Pro, etc. and have all the money come to your account, and then use the Pay API to distribute those funds out to people accordingly. This could be automated with an IPN solution and possibly the use of a CRON job on your server.
This is the method I like to use, and I typically go with a full Payments Pro / Express Checkout integration for payments on my site and then I distribute via the Pay API within an IPN solution or CRON job like I mentioned.
I've puzzled by this question for quite a while, but never had the need for it. Now I do.
What I currently need is a Credit Card payment option for my website that does not rely on services such as Paypal. I want something like Name.com or Hostmonster.com have. You simply enter you credit card number, expiration date and the three little numbers at the back of the card. How can I achieve the same effect on my website?
I'll be programming the website in PHP.
Answers would be appreciated.
You need to signup to a payment gateway. It's a service that allows you to process credit card payments. I know you don't want to use PayPAL to accept payments, but PayPAL offer two solutions:
PayPAL Payments - That is the button and people pay through PayPAL
PayPAL Payments Pro (Payment Gateway). That is when you use PHP or anything else to connect to PayPAL with the credit card information. The customer never knows you used PayPAL, and they never leave your site.
When choosing a payment gateway these are the four most important things you should consider:
How easy is it to implement (PayPAL has a lot of documentation)
How much is the monthly fee.
How much do they charge per transaction.
How much do they charge to setup an account.
There are other options, and one of the most common is Authorize.net, but the is more setting up and a larger deposit to open an account.
Most accounts will require a background and credit check.
Well, you'll still need to rely on a Merchant Services company for card processing. There are many companies that boast an API that can then be accessed with PHP. One that I have recently learned of is Stripe. However, there are many competitors and you can research other companies further, but companies like Stripe will allow you to generate payments programmatically without having to leave your site to visit the black-box that is PayPal.
I am trying to figure out exactly what payment solution to use for my site.
I would like to do the same thing as Spotify (https://www.spotify.com/us/freetrial/ - You'll need to login to see it), allowing users to choose whether they want to pay with PayPal or use a credit card and then taking them to a payment selection screen (on PayPal), then returning them to my site to click confirm and buy.
I am already paying for recurring payments (even though I've yet to use it) and am unsure if that is applicable here. I have also integrated express checkout but I don't know if it will allow recurring payments.
EDIT: Do I need a separate token for recurring payments? Do I have to use the old recurring payments checkout screen? How can this be done as efficiently as possible, like Spotify? Here are my efforts to create a recurring payments profile after express checkout: http://pastie.org/private/sakzopltnwfv93wwmduqq
Diagram:
Select Buy & PayPal (subscription) --> Choose Payment (on PayPal) --> confirm & pay (my site)
This is what spotify's checkout looks like (It wouldn't say update for first time users):
Are they using recurring payments + express checkout? I would really appreciate some help with this.
Yes, you can get this done with Express Checkout + Recurring Payments. That said, if the person chooses credit card when setting up a recurring payment they will have to create a PayPal account. If they're paying a non-recurring checkout then they could use the credit card option without creating a PayPal account.
You mentioned that you're already paying for recurring payments..?? Are you referring to Payments Pro? If so, you don't need to pay for that to use EC + RP. Pro is only necessary if you want to process credit cards directly on your site without ever redirecting to PayPal. This can sometimes make things seem a little more professional and would also give you the ability to let people setup recurring payments without creating a PayPal account when using a credit card.
When using EC you just need to make sure to include the billing agreement parameters in order to get a token back that will work within CreateRecurringPaymentsProfile. Refer to the SetExpressCheckout API reference for more details on that.
This is kind of old now, but is still useful. Take a look at this sample express checkout set of api calls. You'll notice it uses the same token throughout all of the calls.
Just like Spotify -you would need to build that option on your site. If the user chooses to subscribe with a credit card - use the recurring payments w/ direct credit card (see below). If the user chooses to subscribe with a PayPal account - use the recurring payments w/ PayPal Account (this is what Andrew is suggesting above in his response).
Here are the how-to guides:
For direct credit card subscriptions: https://www.x.com/developers/paypal/documentation-tools/paypal-payments-pro/how-set-recurring-payments-profile-using-direct-payment
For PayPal Account subscriptions: https://www.x.com/developers/paypal/documentation-tools/express-checkout/how-to/ht_ec-recurringPaymentProfile-curl-etc
The APIs would allow you to do things like trial periods, setup fee, etc. For example here is a how to on building a freemium kind of model: https://www.x.com/developers/paypal/documentation-tools/express-checkout/how-to/ht_ec-freeTrialRecurringPayments-curl-etc
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