I have a small PHP ecommerce site set up using Authorize.net's SIM (simple)
interface. Working fine, but... I'd like to implement their AIM interface
(so visitor's will never see the gateway's URL).
I found a script that does this but requires cURL... and my hosting provider
doesn't support it.
Here is the snippet of the code that uses cURL functions ($data values are
set before this from the purchase form):
$curl_handle = curl_init ();
curl_setopt ($curl_handle, CURLOPT_URL,
"https://secure.authoriz e.net/gateway/transact.dll");
curl_setopt ($curl_handle, CURLOPT_FOLLOWL OCATION, 1);
curl_setopt ($curl_handle, CURLOPT_RETURNT RANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_POST, 1);
curl_setopt ($curl_handle, CURLOPT_POSTFIE LDS, $data);
$response = curl_exec ($curl_handle) or die ("There has been an error
connecting to Authorize.net." );
curl_close ($curl_handle);
It appears that data is being posted to the gateway and information returned
(credit card accepted/declined) and then processed without actual web pages
being displayed.
What is cURL actually doing and can it be done some other way?
Is there any way I can accomplish the same thing without curl libraries...
maybe write my own lower level code? I can certainly post data to the
gateway... and, if I knew how to accept the returned data, can perform the
necessary steps from there. My big blank spot seems to be how to receive
that data response.
Thanks.
Rick
interface. Working fine, but... I'd like to implement their AIM interface
(so visitor's will never see the gateway's URL).
I found a script that does this but requires cURL... and my hosting provider
doesn't support it.
Here is the snippet of the code that uses cURL functions ($data values are
set before this from the purchase form):
$curl_handle = curl_init ();
curl_setopt ($curl_handle, CURLOPT_URL,
"https://secure.authoriz e.net/gateway/transact.dll");
curl_setopt ($curl_handle, CURLOPT_FOLLOWL OCATION, 1);
curl_setopt ($curl_handle, CURLOPT_RETURNT RANSFER, 1);
curl_setopt ($curl_handle, CURLOPT_POST, 1);
curl_setopt ($curl_handle, CURLOPT_POSTFIE LDS, $data);
$response = curl_exec ($curl_handle) or die ("There has been an error
connecting to Authorize.net." );
curl_close ($curl_handle);
It appears that data is being posted to the gateway and information returned
(credit card accepted/declined) and then processed without actual web pages
being displayed.
What is cURL actually doing and can it be done some other way?
Is there any way I can accomplish the same thing without curl libraries...
maybe write my own lower level code? I can certainly post data to the
gateway... and, if I knew how to accept the returned data, can perform the
necessary steps from there. My big blank spot seems to be how to receive
that data response.
Thanks.
Rick
Comment