Re: Credit Card Gateway
| From: | Jason Beebe | Date: | Sun, 17 Dec 2000 20:36:00 +0000 |
| Subject: | Re: Credit Card Gateway | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30759@lists.php.net to get a copy of this message | ||
i just went through this myself. here's what ya have to do.
you have to use a program called curl. you can compile php with it to have
the curl functions built in, however I'm using it standalone using exec() to
access the post function. here's what ya need to do on a freebsd server.
install openssl --> download it, ./configure --prefix=/path/to/install,
make, make install. install curl -->
./configure --prefix=/path/to/install --with-ssl=/path/where/you/installed/o
penssl
if the proper libraries are now present in usr/local/lib everything is none
working properly. the libs you should have are librsaref.so, librsaref.so.2,
and rsaref.a (i believe).
to the curl syntax to do the post from the command line is.
curl -m 120 -d
"account=6238100&password=mypass&noc=John%20Doe&cardnum=40003243988322738...
and so on" https://secure.ibill.com/cgi-win/ccard/tpcard.exe
----- Original Message -----
From: Cedric Veilleux <swinfo@altern.org>
To: <php-general@lists.php.net>
Sent: Sunday, December 17, 2000 12:50 PM
Subject: [PHP] Credit Card Gateway
Hi,
I need to implement automatic credit card processing in my PHP Shopping
Cart script, using iBill Gateway service. The gateway works by sending a
HTTPS POST request to a script on iBill server. The answer to the request is
the result of the transaction (approved/declined,code,blah,blah,blah) in a
comma seperated parsable string.
I'm not sure how I can do it... Here's 2 ways I see it, not sure if it
can work:
PHP Collects Credit Card info + calculates order total ---> Send a POST
request to iBill ---> Parse results --> Prints Approved or Declined message
to client.
In order to do this, I would need some sort of HTTP function in PHP and I'm
not sure if there are...
The other way would be :
PHP Collects Credit Card info --> Run another program ( exec() ) that can do
HTTPS POST requests and pass the necessary info to it --> Have this program
output the answer from iBill --> Get this answer in the return value of the
exec() function of PHP --> Parse the answer
My problem with this solutions is that I don't know which programs can do
this (I'm under a UNIX based system).
Any help appreciated!
Cedric