Tuesday, November 08, 2005

SSL Payment Gateways

I am in the process of setting up a shopping cart system for a new site. It is using an SSL certificate to protect the checkout section, and for credit card transactions, it feeds the payment details to a 3rd party payment gateway (www.directone.com.au). The gateway processes the payment and sends a result code back to my web site. This result code signifies the result of the transaction. The web site then decides what to do with the user, depending on this code (Thankyou page, or error page).

Getting the web server to communicate with the gateway can be a challenge. Directone requires the IP address of the machine that sends the payment details to it. It does not process payments from IP addresses that are not given to it beforehand.

When I set up the SSL, I has the site migrated to a static IP address, and when I set up the access in the control panel for the gateway, this was the IP address that seemed the most obvious to use.

As I later realized, our hosting company has things set up in such a way that although our web site has it's own IP address that handles all brower requests, outgoing requests made through PHP scripts go out on another IP. In our case the IP address of the physical server that our site sits on (we use shared hosting). Of course this probably wouldn't occur with a single site web server.

No comments: