Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dealing with credit card payments as a developer

Status
Not open for further replies.

oohoohoohooh

Programmer
Apr 30, 2005
55
GB
Hi, say I wish to create a shopping cart company for a company. To checkout and purchase their goods I wish for them to use a credit card. I understand the best way is to use a third party organization (like paypay or 2checkout) but say my company has a merchant account and a server setup with SSL enabled. How would I deal with the credit card information during the checkout transaction would I need to redirect to another area (note I don't really understand SSL too much) and then finally store the credit card information in the database where the company would deal with it via their merchant account.

I would appreciate it if someone could explain this quite thoroughly to me as I wish to use this in the future but the thought at the moment is quite scary. Thanks
 
Credit-card processing is actually not all that hard.

There's two ways to do it. One is, as you have said, a 3[sup]rd[/sup]-party company to do it. I've never liked this method, as it requires my users to leave my site and go to the 3[sup]rd[/sup]-party company's site and back and I don't like not being able to control that.

The other way is to write your script so that it collects information from your users then contacts the credit-card clearinghouse itself. I like this method much better, although it will require that you do a bit more research yourself.

[In case I wasn't clear, let me use a metaphor.

In the first method, your user goes up to a window to talk to a person to buy goods. Your person in the window takes the user's order, then tells the user, "Okay, you now have to go to window number 23 to pay on your credit card, then come back here when you're done."

In the second method, once your employee has taken the user's order, the employee places the credit-card charge himself.
]

If you already have a merchant account with a clearinghouse, contact them. They likely have a web services with which your scripts can interact. Depending on how the clearinghouse's web service works, it could be as simple as using fopen() with a URL. At worst, you might have to do a little cURL programming.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Ah cheers, I've used curl before making an amazon web service. One question where does the SSL come into it to keep the credit card details secure during the transaction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top