ryans1000 Posted February 11, 2003 Posted February 11, 2003 I found out that OSCommerce comes with a new method of communicating with Authorize.net - Simple Integration Method (SIM). I have the OSC daily release of 1/28 and that is the method that was included. From what I've heard, OSC use to come with the Weblink - Relay Responce method of connecting with Authorize.net but Authorize.net is weeding that method out because they are raising their security standards. However the SIM method is secure enough. There is also a OSC contribution available to add on, created by Bao Nguyen which used the ADC Direct Connect Method to talk to Authorize.net and I believe that is even faster and more secure than SIM but if you don't want to mess with installing that contribution than you could just go with SIM. To set up SIM just go to Authorize.net to the 'settings' page and than to the 'transaction response' page and add your 'Receipt URL' and add your 'Relay Response URL'. These two URLs should be the paths to your 'checkout_process.php' OSC page. Than, still on Authorize.net, go back to 'settings' and 'Security' and 'Obtain Transaction Key' and once you get the key...enter it in the Admin section of OSC. In the Admin seciton of OCS go to 'Modules' -> 'Payment' and 'Authorize.net' and it's pretty self explanatory from there. The thing that bothers me is that i found no documentation about this with OSC. You would think they would give you some instructions with the download. Did I miss them or is there no documentation. I wasted numerous hours trying to get this to work and it would have taken 15 minutes if there was documentation
Mark1 Posted February 13, 2003 Posted February 13, 2003 Thanks for the update Ryan. I may have a problem, and there may be a simple solution for it. I have a release (I am not exactle sure of the date. Can someone tell me how to determind the release date?) That was installed back in December. I have customized it, and paid to have several changes done that I was not able to do. Now, After trying to install Bao Nguyen's ADC authorizenet module, I find myself lost. I have done everything I am capable of doing, as well as trying to get the help of my host. I have been unsuccessful as of yet. I need to get some sort of fix for my authorize.net account to work. I am paying monthly fees to authorizenet, and a reseller and I cant even use the service. Can someone please give me an opinion on how easy it would be to update my existing version with all the mods and customization to the latest release so I can use the SIM method for authorize.net? Maybe I dont need to update at all, I may be able to get away with uninstalling the Bao Nguyen mod. and setting up for the SIM. Please help!!
ryans1000 Posted February 13, 2003 Author Posted February 13, 2003 You will know if your version of the Authorize.net module is using the SIM method if you see look in this file 'catalog/includes/modules/payment/authorizenet.php' and you see the following lines 'function hmac ($key, $data)' 'tep_draw_hidden_field('x_Relay_URL', tep_href_link FILENAME_CHECKOUT_PROCESS, '', 'SSL', false))' Also, I believe that in the Admin section, under your Authorize.net configuration there will not be an input box for a 'transaction key' if your using and older method. I'm not completely sure on what all files you would need to update the Authorize.net module alone but a good guess would be just these two files. 'catalog/includes/modules/payment/authorizenet.php' 'catalog/checkout_process.php' Doesn't hurt to try, just backup your originals.
ryans1000 Posted February 18, 2003 Author Posted February 18, 2003 For those of you that still get the infamous error message "There has been an error processing your credit card. Please try again." That is a very common error and the problem could be several things. I found that the customer support at Authorize.net is very knowledgeable and worth calling. However, they couldn't figure out my particular problem until I gave them more detail on what was happening. To get more info on what may be happening, the below information might help you. It may also help those of you that are using other connect methods other than SIM but I'm not positive on that. The two major events that happen on checkout is the sending of the credit card information to Authorize.net and recieving a response from Authorize.net. There are ways to verify both events. With the SIM method, I found that printing the Response Code, Response Subcode, Response Reason Code, Response Text allowed me to inform the Authorize.net customer service of the error and the problem was eventually solved from there. To print out this debugging information I changed some code inside the authorizenet.php file. I edited this function. function before_process() { global $HTTP_POST_VARS; if ($HTTP_POST_VARS['x_response_code'] == '1') return; if ($HTTP_POST_VARS['x_response_code'] == '2') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); } // Code 3 is an error - but anything else is an error too (IMHO) tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_ERROR_MESSAGE), 'SSL', true, false)); } I deleted my original code after I fixed the problem but I believe this was it, you just add 4 debug lines to the function and temporarily comment out the other code function before_process() { global $HTTP_POST_VARS; //if ($HTTP_POST_VARS['x_response_code'] == '1') return; //if ($HTTP_POST_VARS['x_response_code'] == '2') { // tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_DECLINED_MESSAGE), 'SSL', true, false)); //} // Code 3 is an error - but anything else is an error too (IMHO) //tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(MODULE_PAYMENT_AUTHORIZENET_TEXT_ERROR_MESSAGE), 'SSL', true, false)); print "Response Code = " . $HTTP_POST_VARS['x_response_code']; print "Response Subcode = " . $HTTP_POST_VARS['x_response_Subcode']; print "Response Reason Code = " . $HTTP_POST_VARS['x_response_Reason_Code']; print "Response Text = " . $HTTP_POST_VARS['x_response_Reason_Text']; } Than go through the checkout process on your website and write down the return codes you get. The response code documentation is available on Authorize.net so you can get more detailed information on what they mean. Log on to authorize.net and go to 'Help' and 'Documentation and Reference Guides' and then 'Simple Integration Method (SIM)' and scroll down to the 'Response Code Details' section. Call authorize.net and tell them your response code and they may be able to assist you furthur.
lderyckx Posted February 18, 2003 Posted February 18, 2003 I've updated to a more recent snapshot, specifically for this functionality. Currently when I try to complete a transaction with authorize.net I get the following error message from https://secure.authorize.net/gateway/transact.dll --- 1054 - Unknown column 'orders_status_id' in 'field list' insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('7', '1', now(), '1', '') [TEP STOP] Is osCommerce trying to pass its own order status variable to Authorize.net? I looked through authorizenet.php and didn't really find an easy way to modify what does and does not get passed to them. Any help would be greatly appreciated. Thanks. Luke
lderyckx Posted February 18, 2003 Posted February 18, 2003 I think I've fixed this. When I updated from the older snapshot to the newer snapshot, the database didn't totally get updated. There weren't any colums in the orders_status_history table for this info. I've manually added them in MySQL and it seems to work know. I'm still not certain however that everything is being passed to Authorize.net properly. Thanks anyway... Luke I've updated to a more recent snapshot, specifically for this functionality. Currently when I try to complete a transaction with authorize.net I get the following error message from https://secure.authorize.net/gateway/transact.dll --- 1054 - Unknown column 'orders_status_id' in 'field list' insert into orders_status_history (orders_id, orders_status_id, date_added, customer_notified, comments) values ('7', '1', now(), '1', '') [TEP STOP] Is osCommerce trying to pass its own order status variable to Authorize.net? I looked through authorizenet.php and didn't really find an easy way to modify what does and does not get passed to them. Any help would be greatly appreciated. Thanks. Luke
Orphon Posted February 26, 2003 Posted February 26, 2003 To set up SIM just go to Authorize.net to the 'settings' page and than to the 'transaction response' page and add your 'Receipt URL' and add your 'Relay Response URL'. These two URLs should be the paths to your 'checkout_process.php' OSC page. Should this be 'checkout_process.php'? I have never seen than page unless it is a "behind the senes" thing... or should it be 'checkout_payment.php' or 'checkout_confirmation.php' Both of which I have seen it goes through in transaction... Angela
ryans1000 Posted February 26, 2003 Author Posted February 26, 2003 The 'checkout_process.php' page is in the catalog/ folder. Yes it works behind the scenes when the order is being processed.
Orphon Posted February 26, 2003 Posted February 26, 2003 To set up SIM just go to Authorize.net to the 'settings' page and than to the 'transaction response' page and add your 'Receipt URL' and add your 'Relay Response URL'. These two URLs should be the paths to your 'checkout_process.php' OSC page. Than, still on Authorize.net, go back to 'settings' and 'Security' and 'Obtain Transaction Key' and once you get the key...enter it in the Admin section of OSC. In the Admin seciton of OCS go to 'Modules' -> 'Payment' and 'Authorize.net' and it's pretty self explanatory from there. I did all this and I am still getting "There has been an error processing your credit card. Please try again." their live help told me to check with my provider to make sure I am connected :? Angela
Orphon Posted February 26, 2003 Posted February 26, 2003 I GOT IT!!!!!! tried live help again, got someone who actually knew what to look for and I got it!!!! I had some "required" fields that were not being sent to them!!!! Time to pass out now!!!! :rockedover: Angela
majik Posted February 27, 2003 Posted February 27, 2003 I have an older snapshot with several mods already in it (8/02). It appears to have the older method of transaction processing for Authorizenet. Is there a way I can get the newer (SIM) method installed and working? Copying the files in did not work due to database errors and whatnot. Any help would be greatly appreciated. thanks.
mrcbrown Posted February 27, 2003 Posted February 27, 2003 I GOT IT!!!!!! tried live help again, got someone who actually knew what to look for and I got it!!!! I had some "required" fields that were not being sent to them!!!! Time to pass out now!!!! :rockedover: I am getting the same error, can you share what you did to get things working?
Orphon Posted February 27, 2003 Posted February 27, 2003 I don't know if you have the same problem.... but what I did was look in my authorize.net acct and look in settings --> Payment Form --> Form Fields --> See what you have checked as required.... I had description and a couple others that OSC wasn't sending with the transaction.... there may be a way to make OSC send these fields, but that I am not sure of.... Angela
mrcbrown Posted February 27, 2003 Posted February 27, 2003 Sadly I have nothing checked as required. I am using the latest release (2.2) and its claimed to work, just not sure whats holding it back. I have OSC in production mode, and Authorize.net in test mode so I can see if the transaction can be completed. I know the card works too, since I purchased a domain name with it today. Ideas?
vtec Posted February 28, 2003 Posted February 28, 2003 i also have nothing checked on that page and dont know what needs to be selected. any furhter info would be great.
majik Posted February 28, 2003 Posted February 28, 2003 Okay, I tried removing the older authorizenet module and installing one from a recent snapshot, but when I turn it on, I get this: Warning: call_user_func() expects first argument, 'tep_get_zone_class_title', to be a valid callback in /var/www/httpd/html/webstore/admin/includes/functions/general.php on line 1230 Warning: call_user_func() expects first argument, 'tep_get_order_status_name', to be a valid callback in /var/www/httpd/html/webstore/admin/includes/functions/general.php on line 1230 Has anyone seen this before, or know how to fix it? Thanks!
majik Posted February 28, 2003 Posted February 28, 2003 Also, trying clicking on edit in the admin section for the new authorizenet module I get: Fatal error: Call to undefined function: tep_cfg_pull_down_zone_classes() in /var/www/httpd/html/webstore/admin/modules.php(204) : eval()'d code on line 1 If that helps.
vtec Posted February 28, 2003 Posted February 28, 2003 i wiped and did a clean install of latest snapshot and heres the error code i get from auth.net Response Code = 3Response Subcode = Response Reason Code = Response Text = Warning: Cannot add header information - headers already sent by (output started at /home/virtual/site3/fst/var/www/html/catalog/includes/modules/payment/authorizenet.php:259) in /home/virtual/site3/fst/var/www/html/catalog/includes/functions/general.php on line 29
vtec Posted February 28, 2003 Posted February 28, 2003 the above is what i get when i remove the code, and add those print statements from an earlier post, not from the stock code. the stock code just gives me the "error processing, please try again" msg.
Guest Posted March 1, 2003 Posted March 1, 2003 Hello Ryan, Thanks, I signed up for authorize.net and was going crazy :stupid: trying to get the site to accept a payment. After reading your posting, I had it up and running is under 15min. Thanks Again
vtec Posted March 1, 2003 Posted March 1, 2003 IT WORKS! it wasnt the setup on auth.net nor the cart setup. it was the time on the server! all i ahd to do was adjust the server timestam so it wasnt 3.5 hours ahead of the auth.net timezone setting. yay! thanks for everyones help on this thread and all the others i read.
Guest Posted March 4, 2003 Posted March 4, 2003 Is there somewhere we can download this SIM method as an addon. im running a heavily modded version of 2.2 post Nov 2002 and would rather stick with it. Thanks
majik Posted March 4, 2003 Posted March 4, 2003 I have been able to make it work to some success by downloading the new snapshot and changing out some of the files related to the method and to checkout. The only barrier I have left is that for some reason, Shipping is not being calculated into the final Total. You'll need to know at least the basics of PHP (which you probably do if your store is all modded) if you do it this way. Things will break, but they aren't too bad to fix. The biggest headache I had (besides shipping) was getting the code right, but forgetting to define variables used or something like that. Good luck.
Guest Posted March 6, 2003 Posted March 6, 2003 Majik, Are you able to be a little more specific as to which files i wil need to change? and what to change? Thanks Craig
Guest Posted March 6, 2003 Posted March 6, 2003 Woohoo...I got it working...was missing a bit of code
Recommended Posts
Archived
This topic is now archived and is closed to further replies.