Okay, it is possible to integrate php with AIM!
A lot of work, and numerous circles have lead to the following discoveries:
- You CANNOT use AIM with the header (); command.
- You Almost certainly cannot link to AIM with fsock.
- You CAN do it with cURL!
You need to reinstall PHP with cURL (not my area, so I won't confuse by saying how). Then you can use something similar to:
$curl_fields="x_Version=3.1&";
$curl_fields.="$curl_fields.=x_Login=[USERNAME]&";
$curl_fields.="x_Password=[PASSWORD]&";
$curl_fields.="x_Amount=$total";
Etc...
$ch=curl_init("https://secure.authorize.net/gateway/transact.dll");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_USERAGENT, "ID Cart");
curl_setopt($ch, CURLOPT_POSTFIELDS, $curl_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
$delimit ="=".$x_Delim_Char."=";
$response_details=explode($delimit,$response);
From the $response_details array you will be able to get the response (approved/failed), and the reason for failure as well as all the other fields that it is set to return to you.
You do NOT need to set the port number (even though cURL allows that) because you are sending to and from an https.
I apologize if this is too simple for the most of you here, but had I known this a week or so ago I wouldn't be quite as bald as I currently am!