Solved

Is there any beginners tutorial for adding Payment Gateway on PHP Site ?

Posted on 2016-11-28
5
60 Views
Last Modified: 2016-11-29
Hi Experts ,

Where can I find the Beginners tutorial for Payment gateway on PHP Site ?
0
Comment
Question by:karthik80c
5 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41904583
I don't think there is one.  Payment Gateways for accepting credit cards over the internet are subject to all of the PCI security standards and are not simple.
1
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 41904621
A more practical solution might be to use PayPal.
https://developer.paypal.com/

But give yourself plenty of time to master the fundamentals.  Even as simple and well-documented as PayPal is, it's still not beginner material.
1
 
LVL 55

Assisted Solution

by:Julian Hansen
Julian Hansen earned 250 total points
ID: 41904734
Each payment provider has their own API - they usually have documentation and libraries that tell you how to integrate your site into their gateway. Each one is different so to there is no generic source for this information.

There are usually two options that are available - form based and server based.

Form based is where you redirect your users to the PG site who then creates the HTTPS connection, displays the form and handles the capturing of the CC / CVV data.

The server based approach is where you capture the CC / CVV data over a secure connection and then use a server to server call to validate / authorise the transaction.

How each is implemented differs from provider to provider. For instance some have have an API that requires you to bundle all your form data together in one string and then encrypt that string with a secret key before sending the data to them - they in turn send back the response using the same method.

To answer this question you need to select the Payment Gateway you want to use  and then ask them for their API documentation. The latter is usually very comprehensive with working samples and libraries that allow you to get up and running fairly quickly.

Some proviso's - the landscape for online transacting is not a simple one. If you are new to this area you would do well to consult with an expert in the field on any solution you come up with prior to releasing it into the wild.

Awareness of things like PCI-DSS is key to ensuring you don't run afoul of the banks - especially if you plan on capturing and potentially storing sensitive data.

Solutions like PayPal are an option but be aware that the availability and implementation of PP varies from country to country.
1
 
LVL 13

Accepted Solution

by:
Phil Phillips earned 250 total points
ID: 41905006
Another thing to look at is either braintree or stripe.  They have pretty good coverage as far as foreign currency goes. They also support other payment methods, such as PayPal, ApplePay, AndroidPay, etc.

As Dave mentioned, coding a payment gateway isn't a small task, especially with PCI in mind. Services like Braintree or stripe make it a bit easier, and they have php libraries available.
2
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41905020
I've done both Paypal and Braintree integration.  Both are a total pain the first time thru.  Their developer support is abominable.  They keep assuming that you know what they know.  Which of course you don't or you wouldn't be asking them questions.
1

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question