Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to process credit cards and integrate with backend payment services to credit them. The majority of solutions on the internet require an intermediary, eg. 2CO, GCO, Auth.net.
Do you have any experience with implementing a credit-card payment gateway in PHP? Any help in appreciated.
Thanks for your time.
Stripe has a PHP library to accept credit cards without needing a merchant account: https://github.com/stripe/stripe-php
Check out the documentation and FAQ, and feel free to drop by our chatroom if you have more questions.
If you need something quick and dirty, you can just use PayPal's "Buy" buttons and drop them on your pages. These will take people off-site to PayPal where they can pay with a PayPal account or a credit card. This is free and super easy to implement.
If you want something a bit nicer where people pay on-site with their credit card, then you would want to look into one of those 3rd part payment providers. None of them (that I'm aware of) are completely free. All will have a per-transaction fee, and most will have a monthly fee as well.
Personally I've worked with Authorize.NET and PayPal Website Payments Pro. Both have great APIs and sample code that you can hook into via PHP easily enough.
There are more than a few gateways out there, but I am not aware of a reliable gateway that is free. Most gateways like PayPal will provide you APIs that will allow you to process credit cards, as well as do things like void, charge, or refund.
The other thing you need to worry about is the coming of PCI compliance which basically says if you are not compliant, you (or the company you work for) will be liable by your Merchant Bank and/or Card Vendor for not being compliant by July of 2010. This will impose large fines on you and possibly revoke the ability for you to process credit cards.
All that being said companies like PayPal have a PHP SDK:
https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/library_download_sdks
Authorize.Net:
http://developer.authorize.net/samplecode/
Those are two of the more popular ones for the United States.
For PCI Info see:
https://www.pcisecuritystandards.org/
Braintree also has an open source PHP library that makes PHP integration pretty easy.
The best solution we found was to team up with one of those intermediaries. Otherwise you will have to deal with a bunch of other requirements like PCI compliance. We use Verifone's IPCharge and it works quite well.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I don't know where else to turn...
I have a client who insists on using PayPal as their credit card merchant. We will be taking cards directly on the site, so I suppose "Website Payments Pro" is the right avenue?
All of these different PayPal types, API's, accounts, etc. are all very confusing to me- I'm used to working with Stripe which is, in my opinion, the best, cleanest solution I have ever found.
Anyway, I have been looking everywhere for some sort of a PHP class to help me interact with the PayPal API as I have all but given up on figuring out how to interact with this thing from scratch. All of the classes I've found are several years old and no longer seem to function properly.
Does anyone have any suggestions? Any help would be extremely appreciated!
This PayPal PHP Class Library will make all of the PayPal Classic API calls very simple for you, including Payments Pro. It has fully functional samples included with it, and then "templates" that are empty and ready for you to simply fill in your param values. It handles the rest.
You can see a sample of the output for DoDirectPayment here, which is the API that is used for Website Payments Pro 3.0 that you mentioned. Note that it's working in the sandbox, and PayPal's sandbox is a little slow processing credit cards, so that sample might take a few moments to load, but the live servers don't do that.
You do need to make sure "Website Payments Pro" is what your client has enabled on their PayPal account if you're going to use DoDirectPayment, though. PayPal has a new version where they dropped the "website" and they just call it "PayPal Payments Pro 2.0". Yes, 2.0 is newer than 3.0. There's a reason for that, and if you're curious you can read about the history of PayPal Pro here.
If the client has the newer PayPal Payments Pro 2.0 enabled then you'll need to use the PayFlow API instead of DoDirectPayment. The class library includes that as well, and you can see a sample of its result here.
Using the library you could get credit card processing up-and-running within minutes.
I suggest the Omnipay Package; it's well maintained and it has a lot of gateways for different payment services. I've started using it 8 months ago: it's simple and it works very well.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am new to paypal integration,
Requirement (paypal USA):
Admin should be able to generate paypal invoice from website admin panel. As this is service invoice and charges will be different depending on client requirement.
And User, from website client area can receive paypal invoice and pay it online.
I ve read few documents of paypal api but couldn't decide which flow/API to use.
Please suggest best way with least coding to integrate paypal with my website.
You can use the Invoicing API for that. My PHP class library for PayPal will make this very simple for you. It comes with fully functional samples and ready-made templates so you can get calls working very quickly and easily.
For example, take a look at the CreateAndSendInvoice sample. All you would need to do is replace the static values with your own static or dynamic values and it would create the invoice in the PayPal system as well as send the user an email to pay the invoice.
It also comes with all the other calls like CreateInvoice, SendInvoice, DeleteInvoice, CancelInvoice, etc, so you can easily make any call you need for a complete PayPal invoicing system.
There are two API endpoints that could serve your purpose.
Invoicing using Classic APIs, which uses SOAP, NVP and at times REST to make calls
Invoicing using New REST APIs which is the new API set that PayPal is actively developing.
The REST APIs are getting actively developed and supported, and we encourage external developers to start using REST APIs over Classic APIs, to ensure long term support from PayPal with any issues, and features. However, as these APIs, are getting developed, few specific features are still getting developed, and should be available soon. However, Invoicing APIs is developed with most features as Classic APIs.
REST APIs also comes with these APIs:
Create an invoice
Send an invoice
Update an invoice
Retrieve an invoice
Get invoices of a merchant
Search for invoices
Send an invoice reminder
Cancel an invoice
Delete an invoice
Retrieve a QR code
Record a payment
Record a refund
We are currently supporting PayPal-PHP-SDK, an SDK for making calls to PayPal REST APIs. There is a lot of documentation around the SDK from installing it, to running samples, etc.
I would definitely recommend you to download this SDK, and run the samples locally in your machine, (which generally takes few seconds to setup), and try out Invoicing Samples. You could modify the samples, to verify the specific use case that you are trying to accomplish. You could view the sample source code online here.
Please let me know if you run into any issues, and we would be more than happy to help.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Our requirements for Paypal Integration seems customized from the Paypal's available products. Paypal documentation is a bit vague to figure out the differences down to earth.
I would like to choose between Paypal Payments Pro, Payments Advanced and Payflow Gateway or any other product that satisfies.
Our Requirements:
Customer should be able to pay with their Paypal account using Paypal Credentials without leaving our website (Also trying to avoid iFrame. Is there any other way?).
Would like to use Paypal's Internet Merchant Account (In future might switch to any other merchant account).
Need support for Non-US Currencies also (services to be launched world-wide in future).
Total transaction value would be not less than $3,000/month.(can be disregarded initially).
Authorization, Capture and Void Payment methods also required.
Payments Advanced seems to work for 1,2,4.
Payflow Gateway seems to work for 1,3,4,5.
Payments Pro is supported by Paypal Express Checkout, which is usually a redirection to Paypal Website. So requirement 1 is ruled out.
If a buyer pays with their PayPal Account they will be redirected to PayPal so they can log into their PayPal Account, this is how PayPal works.
If you want people to stay on your Website you need to get setup with PayPal Payments Advanced and they will stay on your website in iFrame.
PayPal Payments Advanced Getting Started Guide
Payflow Pro is straight credit card processing so no PayPal Account is used to process these payments.
Express Checkout is using PayPal so it does not work in an iFrame and it will redirect to the PayPal login Page by design.
Your other option is the embedded checkout design here is the documentation on it
PayPal Embedded Checkout Design Integration Guide
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have a shareware site where the user pays $25 for an annual membership. The shareware is free, the membership entitles users to support and an enhanced version of the shareware.
I would like to create a page on my site where the user can make a Paypal payment without leaving the site. Then, I want the user to land on a specific thank you page.
I'm not able to find documentation on how to do this, other than this intimidating, 256 page guide: Gateway Developer Guide and Reference.
My needs are humble. I'm hoping there is a quick-start guide I missed.
Please advise.
PS: I do have the Paypal Advanced ($5/month).
If you absolutely do not want to leave the page you will need to use PayPal Payments Advanced Or PayPal Payments Pro
Advanced comes with a $5 monthly fee and you will see PayPal branding, (I believe this is almost like an iFrame), however I have never used this service so cannot comment on what is required.
Pro is $30/month however you will not see PayPal branding and user will have no idea PayPal is being used in the backend
This uses an API that you are going to have to do progamming for since it is all done in the backend, and you are also most likely going to want an SSL Certificate.
There is PayPal Payments standard, but that puts a button on your page which redirects you to PayPal. Your customers will not need a PayPal account to pay. This option is free (aside from regular PayPal fees)
There is also PayPal Express Checkout, I am not 100% sure what the difference between this and Payments Standard is.. perhaps a PayPal account is required?
PayPal have prohibited the page from being included in an iframe, by setting the X-FRAME-OPTIONS header.
There is no way around this security measure.
You could provide a link to go back to your site if you want payment running through PayPal.
This question already has answers here:
Closed 12 years ago.
Possible Duplicate:
Credit card payment gateway in PHP?
I am looking for a solid credit card solution and we are not interested in PayPal. I am currently unsure about the volume of transactions. Someone suggested merchantone but after looking at some reviews i have my apprehensions. Idealling something around a ~2% transaction charge, with some monthly fees.
What do you guys suggest, we need a flexible API which we can utilize easily with PHP. Any recommendations will be helpful.
The Authorize.Net payment gateway API is by far the easiest to use. They provide sample code and there are good classes and tutorials out there, too.
To use Authorize.Net you would need a separate merchant account. There are lots of providers out there and their rates and fees will vary. But all of them work with Authorize.Net. Your merchant account provider can set you up with them or you can choose from any of their resellers to get an account.
I've done custom integrations with PayPal's PayFlow pro, Firstdata (used to be LinkPoint), and authorize.net... and would have to say authorize.net was by far the best to work with. Their API is heaps less complicated than FirstData's (in my opinion), and they generally have better support.
How about Authorize.net?
http://www.authorize.net/
Or google checkout?
http://checkout.google.com