Tuan Le Posted January 5, 2004 Share Posted January 5, 2004 Has anyone here got the Authorize.net module to work with the OSCommerce 2.2 MS2, especially running on the Windows 2003 platform? Any tips? Thanks -Tuan Link to comment Share on other sites More sharing options...
jrwrestling Posted January 5, 2004 Share Posted January 5, 2004 do a search on the forum for Authorize.net module Link to comment Share on other sites More sharing options...
Tuan Le Posted January 6, 2004 Author Share Posted January 6, 2004 After reading well over 20 authorize.net threads, still have not found the solution. :( Let me know if any of you got it working on Windows 2003. Thanks Link to comment Share on other sites More sharing options...
Tuan Le Posted January 6, 2004 Author Share Posted January 6, 2004 I have curl and openssl installed on my Windows 2003 server. When I checked the php.info on my server, it is show is that curl is installed and enabled. For the command line in authorizenet_direct.php file, am using the command below to post to the gateway. exec("c:/curl/curl.exe -d \"$data\" https://secure.authorize.net/gateway/transact.dll", $response); I even tried replacing the line above with the codes below, but that didn't help either. $url = "https://secure.authorize.net/gateway/transact.dll"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $authorize = curl_exec($ch); curl_close ($ch); $response = split(",", $authorize); I am getting the infamous error, "There has been an error process you card......" Do you happen to know what I need to add in order to get the true error from authorize.net instead of this generic message? Any help you can give me would be greatly appreciated. Thanks -Tuan Link to comment Share on other sites More sharing options...
guntersammet Posted January 7, 2004 Share Posted January 7, 2004 Do you run the authorize.net module which is by default installed or do run the authorizedirect module from the contribution section? Don't remember that the main one needs curl, but I could be wrong. I just debugged an install for somebody else and to get some info what message came back from authorize.net I added the following code in the authorize.php module in catalog/includes/module/payment/: //add some code to mail the post vars reset($HTTP_POST_VARS); $return_data = ''; while (list($key, $val) = each($HTTP_POST_VARS)) { $return_data .= "$key => $val\n"; } tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'data', $return_data, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); just after those lines: function before_process() { global $HTTP_POST_VARS; //add some code to mail the post vars This mails the response from authorize.net to the email address defined in admin for the store owner. You get something like this back: x_response_code => 3 x_response_subcode => 2 x_response_reason_code => 33 x_response_reason_text => Card Code is required. ... OR x_response_code => 3 x_response_subcode => 2 x_response_reason_code => 33 x_response_reason_text => Bill To Company is required. ... OR x_response_code => 1 x_response_subcode => 1 x_response_reason_code => 1 x_response_reason_text => This transaction has been approved. ... OR x_response_code => 2 x_response_subcode => 2 x_response_reason_code => 44 x_response_reason_text => This transaction has been declined. Searching in Google gave me the response codes but I didn't write down the links. so try it yourself. HTH Gunter Link to comment Share on other sites More sharing options...
Tuan Le Posted January 7, 2004 Author Share Posted January 7, 2004 Where in the authorize.php file did you add those lines of codes? Is it all the way at the bottem? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.