5 replies [Last post]
StephenGWills's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Not Kulvik
Joined: 08/07/2007
Juice: 414
Was this information Helpful?

I've gone and hacked core again Sad in uc_authorizenet.module around line 228 I added:

uc_order_comment_save($order_id, $user->uid, $x_response_code, 'admin');

so that the AVS messages returning to in-checkout are viewable by the administrator. It really helps us a lot.

- Steve

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Feeding back Auth.net CC errors.

+1000 for this. Good catch Smiling

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Feeding back Auth.net CC errors.

Committing a version that adds the response code and response text to the original comment that got saved.

chadcrew's picture
Offline
Bug FinderGetting busy with the Ubercode.
Joined: 12/28/2007
Juice: 195
Re: Re: Re: Feeding back Auth.net CC errors.

Sounds like a good idea to me too.

Ryan - at least in the version I grabbed from Bazaar, there seemed to by a bug:

uc_order_comment_save($order_id, $user->uid, $message . t('Response code: !code - !message', array('!code' => $x_response_code, '!text' => $x_response_text)), 'admin');

!text should be !message, as shown here (I also added a period and space after the $message):

uc_order_comment_save($order_id, $user->uid, $message . t('. Response code: !code - !message', array('!code' => $response_code, '!message' => $response_text)), 'admin');

I'll update the Authorize.net CIM contrib module (http://www.ubercart.org/contrib/2537) with this now. If any of you are up for helping me test that module out, I'd be grateful for the input. Smiling

Best,
Chad

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Doesn't work ...

This is what I'm getting in my Admin comments:

Credit card charged: $2.99. Response code: Array - Array

Using the code that Chad fixed in the above post.

The corrected code is below:

<?php
uc_order_comment_save
($order_id, $user->uid, $message . t('. Response code: !code - !message', array('!code' => $x_response_code, '!message' => $x_response_text)), 'admin');
?>

The main difference is the $x_ in front of response_code and response_text.

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Doesn't work ...

Alrighty... fixed it up. Instead of the period I added a line break, and I just made it use !text in the comment for consistency with the variable name. Thanks for the report. Smiling