Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

authorize.net difficulties


edschaum

Recommended Posts

I am so close, I got authorize.net to accept the payment but it still comes back with the error: "There has been and erorr processing your card..."

Anyone run into this?

 

Ryan

 

 

I (well, and many others) got the same error, and I found in my case, the original message from Authorizenet was "This transaction cannot be accepted for processing".

 

It appears that the error is due to the data not acceptable. Exmaning the AIM minimum requirement, I notice it says now:

verson 3.1

x_Delim_data TURE

 

So, I change x_Version => '3.0' to x_Version => '3.1' in authorizenet_direct.pdp

and specify delim data "yes" in anthorizenet setting ( Bao says specify it "no". Well, I did not try if "no" is working after giving version 3.1)

 

Then, it goes through without any problem.

 

About curl

 

exec("/usr/bin/curl -d "$data" https://secure.authorize.net/gateway/transact.dll", $response);

 

does not work in our system (linux). But

 

exec("/usr/bin/curl -d $data https://secure.authorize.net/gateway/transact.dll", $response);

 

is fine. The curl configuration:

bash-2.05$ curl -V

curl 7.9.4 (i686-pc-linux-gnu) libcurl 7.9.4 (OpenSSL 0.9.6b)

 

No problem of taking shared ssl. I use our shared ssl for a customer's site.

 

The "There has been an erorr processing your card" and "$data" problems seem to be quite common as seen in this discussion. It might be a good idea to see if an update on the module can help.

 

I really appreciate Bao's contribution. Thanks Bao.

 

 

David

David

We support osCommerce

Link to comment
Share on other sites

  • Replies 128
  • Created
  • Last Reply

This is a really dumb question ... but I have to ask it anyway ...

 

I loaded the current snapshot of oscommerce ...

 

I went to the AuthorizeNet site and fussed with setting the URLs ...

 

I had the client set the AuthorizeNet settings in the Admin ...

 

I made no code changes ... added no add-ons ... and everything works.

 

Umm ... what I am I doing or lucky enough to have experienced here that I am not going through a nightmare from hell like all of you guys in trying to get this to work? :shock:

 

I was terrified this was going to be my worse nightmare ... and other than fussing a bit with the URLs I feel really lame that it was so simple and I was so concerned due to this thread that it was going to be my worse experience ever with osCommerce.

 

Can someone shed a little light on the subject as to why I am a happy camper and none of you guys are? 8)

Link to comment
Share on other sites

Authorizenet is doing away with the URL referal method of connecting, which is what the default Authorizenet module does. Within a couple of months you will not be able to connect to Authorizenet using that method and you MUST use either the direct connect method or what they are now calling SIM method - this is why people are scambling to make the changes now before the clock runs out....

Link to comment
Share on other sites

Well just heck ... blow away my happiness over this one. :bomb:

 

I just knew there was a catch to this.

 

When you guys get all the bugs out, ummm ... do let me know the simple 5 step approach to making this work right the first time ...

Link to comment
Share on other sites

i have posted a modified version of Bao's Authorizenet Direct Connect mod for the new checkout process version and have been using it. My version of the mod includes requiring the customer to enter their CVV number but it is not stored in the database, simply passed along to Authnet for verification (very useful for wrongful chargeback claims)

 

it appears that most problems listed here are based on how cURL is installed on peoples servers. I havent had any problems with the basic installation of Bao's mod or the modified mod we created.

Link to comment
Share on other sites

Oh and while you are being happiness bubble bursters ... can both methods be active on the AuthorizeNet side?

 

As in leave the URL settings there active and on another setup use the new method without changing the settings over there?

 

Yes, assume not a bright bulb here ... :shock:

 

I like to write cool add ons and such, and make some interesting code happen for people ... but there are some grey areas or are they grey cells that are rather dead. :roll:

Link to comment
Share on other sites

no, on the authnet side you have to select one method to use - as far as i can tell from going thru the authnet admin area there is no way to run more than one method, and you really wouldn't want to anyway - direct connect is the most secure method to use.

 

i know the feeling about gray matter........

Link to comment
Share on other sites

Well isn't that just poopy ... :(

 

I know that it is *better* to use the new method but while working on it, it would be nice to have either way configured and simple to switch to without thinking ... thinking weakens the team I hear tell ... :wink:

Link to comment
Share on other sites

:lol:

 

well, continue using the URL referal method for now while you get comfortable with the Direct Connect method

 

the ONE THING I learned the hard way was, when you switch from the URl referal method to direct connect you need to delete the url's you have entered in your authnet admin panel, turn on password required and a couple of other things (see Bao's notes with his mod), and in Authnet, if it asks you if you want to turn Web Connect off, DO NOT TURN IT OFF!!

 

Once you turn it off you cannot go back to using the URL referal method (while it still is accepted by Authnet)....

 

I made the mistake of saying yes to that question and than lived for 2 weeks having to process orders manually because I could not go back while I continued to work on the Direct Connect modifications...

 

:wink:

Link to comment
Share on other sites

just follow Bao's original directions in setting it up or call authnet and they can walk you thru the settings in your authnet panel (thats what I should have done the first time, but nooooooooo - I'm a guy - ask for directions???....)

 

this method is definately more secure and I had to add the CVV for added protection against fraud

 

so have fun and go for it 8)

Link to comment
Share on other sites

I fixed my adc authorizenet issues via a means not seen here. :-)

 

Others had enabled the -k switch on their curl command. My version of curl didn't support -k . I have curl 7.9.4 installed on a cobalt raq server.

 

I had to use -0 to make it work, instead of -k. The result is the same. My non-working authorizenet connection now works.

:-)

 

The next step is upgrading curl so I can use a more secure menas and remove -0 (BTW thats A ZERO not the letter O)

Good luck,

Tom

Link to comment
Share on other sites

  • 3 weeks later...

I have read and followed the installation of Authorizenet ADC Direct Connection, modified and downloaded the necessary files.

 

When I try to connect to authorize.net placing an order I get this error"

 

Warning: Failed opening 'includes/classes/cc_validation.php' for inclusion (include_path='') in /home/ebookat/public_html/shop/includes/modules/payment/authorizenet.php on line 69

 

Fatal error: Cannot instantiate non-existent class: cc_validation in /home/ebookat/public_html/shop/includes/modules/payment/authorizenet.php on line 71

 

The authroizenet.php on line 69 and 71 looks like this:

 

include(DIR_WS_CLASSES . 'cc_validation.php');

 

$cc_validation = new cc_validation();

 

Could someone points me where to go next?

 

Henrik

Link to comment
Share on other sites

Hi Tom,

 

Thanks for the reply.

The problem is I cannot find the validation.php in the includes/classes directory or elsewhere.

 

I have looked in the latest snapshots but I don't see anything called validation.php. Is this a php I need to create?

 

Henrik

Link to comment
Share on other sites

I still cannot find cc_validation.php.

There is something called ccval.php and validations.php in the functions directory but nowhere do I see cc_validation.php.

 

Henrik

Link to comment
Share on other sites

Hi all:

 

I appreciate hearing how everyone has managed to get this gateway working. I'm looking forward to doing so myself.

 

Anyway, here's where I'm at. I have changed the delimimeted response setting to on in my Authorize.net settings, and changed x_Delim_Data to 'true'.

 

I have removed the forward slashes and the quotation marks from around the variable $data.

 

I have tried "-k" in the exec string, as well as "-d" and "-k -d".

 

I have changed the password field to my transaction key using the field x_Tran_Key provided by Authorize.net. I have also used it with my login password provided by Authorize.net.

 

I have inserted a field for "Company" because my merchant account requires it.

 

I've tweaked a couple of other things according to suggestions on this thread, but nothing that works so far. I have verified through my host (iPowerWeb) that cURL is installed in /usr/bin/curl. And, I am accessing the checkout page using my host's shared certificate secure connection, and that SSL server is set in the configure.php file in the includes directory.

 

So far, when I test the checkout, I get a page that returns with all the fields filled out as I would expect them. All the fields that are required by my host are there. When I test the Authorize.net response, I get a blank page. No header, nothing. The source reads:

 

<html><body></body></html>

 

That's it. I believe that I have followed Bao's directions faithfully, though I couldn't telnet the server from my Mac (well, maybe I could, but I decided to call them to verify the presence of cURL, instead of figure out how to log on to the server via telnet). All the files that came with the contribution are safe and sound in the places that they should be. If anyone would like to try it, you can access the test site at http://www.virtuallyunique.com/test/catalo...log/default.php both of my products are bogus, and I have set my Authorize.net settings to test mode. For kicks, I'll also include the most recent version of authorizenet_direct.php below. If anyone has any ideas, I would really like to hear them. I'm pretty frustrated, and am still a novice at php.

 

TIA,

 

Jason

 

<?php

/*

  osCommerce 2.2 (Snapshot on November 10, 2002) Open Source E-Commerce Solutions

  Authorizenet ADC Direct Connection

  Last Update: November 10, 2002

  Author: Bao Nguyen

  Email: [email protected]  

*/



unset($form_data);

// set x_Tran_Key to your authorizenet transaction key!!!



 $xx = '';

 for ($i=0; $i<sizeof($order->products); $i++) {

$xx .= $order->products[$i]['qty'] . '-' . ($order->products[$i]['name']) . '**'; 

}

$form_data = array(

x_Login => MODULE_PAYMENT_AUTHORIZENET_LOGIN,

x_Tran_Key => 'my_real_transaction_key_goes_here',

x_Delim_Data => 'TRUE',

x_Version => '3.1',

x_Type => 'AUTH_CAPTURE',

x_Method => MODULE_PAYMENT_AUTHORIZENET_METHOD == 'Credit Card' ? 'CC' : 'ECHECK',

x_Amount => number_format($order->info['total'], 2),

x_Card_Num => "$x_Card_Num",

x_Exp_Date => "$x_Exp_Date",

x_Card_Code => "$x_Card_Code", 

x_Email_Customer => MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER == 'True' ? 'TRUE': 'FALSE',

   x_Email_Merchant => MODULE_PAYMENT_AUTHORIZENET_EMAIL_MERCHANT == 'True' ? 'TRUE': 'FALSE',

x_Cust_ID => "$customer_id",

x_First_Name => "{$order->customer['firstname']}",

x_Last_Name => "{$order->customer['lastname']}",

x_Company => "{$order->customer['company']}",

x_Address => "{$order->customer['street_address']}",

x_City => "{$order->customer['city']}",

x_State => "{$order->customer['state']}",

x_Zip => "{$order->customer['postcode']}",

x_Country => "{$order->customer['country']['title']}",

x_Phone => "{$order->customer['telephone']}",

   x_Email => "{$order->customer['email_address']}",

x_Ship_To_First_Name => "{$order->delivery['firstname']}",

x_Ship_To_Last_Name => "{$order->delivery['lastname']}",

x_Ship_To_Address => "{$order->delivery['street_address']}",

x_Ship_To_City => "{$order->delivery['city']}",

x_Ship_To_State => "{$order->delivery['state']}",

x_Ship_To_Zip => "{$order->delivery['postcode']}",

x_Ship_To_Country => "{$order->delivery['country']['title']}",

x_Customer_IP => "{$HTTP_SERVER_VARS['REMOTE_ADDR']}",

x_Description => "$xx",

tep_session_name() => tep_session_id());



if(MODULE_PAYMENT_AUTHORIZENET_TESTMODE == 'Test')

{	$form_data['x_Test_Request'] = 'TRUE';  }



// concatenate order information variables to $data



while(list($key, $value) = each($form_data)) 

{	$data .= $key . '=' . urlencode(ereg_replace(',', '', $value)) . '&';  }



// take the last & out for the string

$data = substr($data, 0, -1);



unset($response);



// Post order info data to Authorize.net, make sure you have curl installed

exec("/usr/bin/curl -k -d $data https://secure.authorize.net/gateway/transact.dll", $response);



?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...