Zen Cart Logo
Forums / General Questions / ZC orders with no Authorize.net processing??

ZC orders with no Authorize.net processing??

Locked

Views: 2,693

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
8 Jul 2009, 3:08 PM
#1
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

ZC orders with no Authorize.net processing??

This is a very strange issue. So far I found the following...

Some ZC orders come through and state credit card payment method with no card number, type etc...

No Authorize.net transaction info either declined or approved. Just nothing.

No debug info in cache for AIM also just not there. So it doesn't even attempt to contact Authorize.net

Majority of orders work fine only a small number has this happen and it appears random.

I am using 1.3.8 with super orders module. Here is my curltest.php info

CURL Test Page
This page is intended for testing CURL behaviour. You should be accessing this page via CURLTEST.PHP running on YOUR server.

You submitted the following fields and data:
Array
(
[field1] => This is a test
[statuskey] => ready
)
Data validation
Good
Other Info

Array
(
[url] => "http://www.zen-cart.com/testcurl.php"
[content_type] => text/html
[http_code] => 200
[header_size] => 139
[request_size] => 174
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.123527
[namelookup_time] => 0.115204
[connect_time] => 0.116012
[pretransfer_time] => 0.116035
[size_upload] => 0
[size_download] => 2140
[speed_download] => 17324
[speed_upload] => 0
[download_content_length] => 0
[upload_content_length] => 0
[starttransfer_time] => 0.123507
[redirect_time] => 0
)

Any ideas what this could be. I think it may be card or user specific as one user it does it everytime they order. I am still investigating that though.

8 Jul 2009, 4:33 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC orders with no Authorize.net processing??

Sounds like you have the Offline Credit Card module enabled, and that's what people are using to place orders. Since that module never contacts the gateway, payment is never received with it. That module is intended for processing cards manually through your own console.
If you want to use the Authorize.net module, click Remove on the other module(s) you're not using.

8 Jul 2009, 5:35 PM
#3
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Sounds like it me too and Maybe your right, but I don't understand how that could happen since it is not enabled in the pay modules and it is only for happening for some users. I will login as one of the users in question and see if that is an available option. Thanks

8 Jul 2009, 5:40 PM
#4
kiddo avatar

kiddo

Totally Zenned

Join Date:
Jul 2006
Location:
SF Bay Area
Posts:
837
Plugin Contributions:
1

Re: ZC orders with no Authorize.net processing??

If this was just in the past few days and otherwise OK, it -might- have something to do with authorize.net having had a fire in their Seattle datacenter this past weekend. I haven't seen what you describe, but did have some other problems with sites using AIM.

8 Jul 2009, 5:46 PM
#5
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Ok I just logged in as on of the users that this just happened to yesterday. I placed an order using all there same info except I used 4111111111111 and it declined my card which I verified in the cache directory through the AIM log. So it using the AIM module and not the Offline CC which has been disable from day one. Also would the offline CC module not show any cc info in the ZC order details page, as this is the case in the anomally.

8 Jul 2009, 5:50 PM
#6
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Thanks for the news, I didn't know that had happened. This has happend only to two of my customers actually. The first was about 2 or 3 weeks ago and it happen to that customer twice back to back which is interesting. I thought is was a fluke so I didn't look into it really. The second was yesterday night and it has my attention now.

Seems to me that if there was a communication error with authorize, then ZC would decline the order but maybe I assume to much... :)

14 Jul 2009, 6:32 PM
#7
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Ok here is what I have found...

I do have super orders 2.0 installed which slightly modifies the orders.php class by adding the following code.

// BEGIN Super Orders edit
    // add CC data as a line item to SO payment system
    if (zen_not_null($this->info['cc_type']) || zen_not_null($this->info['cc_owner']) || zen_not_null($this->info['cc_number'])) {
      require(DIR_WS_CLASSES . 'super_order.php');
      $so = new super_order($insert_id);
      $so->cc_line_item();
    }
    // END Super Orders edit

Other then that the order.php and ordertotal.php classes are stock 1.3.8 Zencart along with checkout_process and the AIM module

I have found that on the abnormal orders the cc_type, cc_owner, cc _number and cc_cvv info is not being recorded in the orders table. cc_method is recorded however and shows the AIM module as it should. All other data is being recorded as usual. Again this happens on a random basis. I have not found a way to consistently generate this anomaly. Could this be _SESSION related and why isn't any error being thrown out, instead it lets the customer complete the order as if everything was fine...I am stumped...Any help would be appreciated.

Matt

14 Jul 2009, 7:01 PM
#8
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Also cc_exipres is blank also. Seems that info is not being passed, but when and where I am still trying to figure out.

19 Jul 2009, 9:18 PM
#9
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Anyone have any ideas this keeps happening on random orders. It seems as though the cc info variables are not being passed from the order confirmation page. What I don't understand is why is Zencart allowing these to be processes without any AIM confirmation. I am unable to duplicate this for testing. Could this have something to do with Super Orders. Why are some going through and some are not. Any ideas for adding debug code to help figure out the problem.... Please HELLLLLLLLPPPPPP

19 Jul 2009, 9:40 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC orders with no Authorize.net processing??

phatkodi:

What I don't understand is why is Zencart allowing these to be processes without any AIM confirmation.
I agree. It was never designed to operate that way.
But without being able to duplicate the exact situation consistently, it's very difficult to come up with a fix.

I'm still inclined to think that you've got payment modules "installed" but have their settings set to "enabled=false" or have zone restrictions on them ... but somehow one or more of those are getting selected instead of the AIM module. Either that or you've got some customizations installed somewhere that are interfering with the normal checkout activity.

19 Jul 2009, 11:05 PM
#11
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

I am almost 100% sure that it is not another payment module getting in the way. I have even renamed the Offline CC module php file just to be sure. It is almost as if the cc info that is in the hidden fields on the confirmation page are blank or are not being passed to the checkout_process as $_POST[] variables. I don't know where the info is being lost. I think I need to add some debug code in key places to tell me more info when this does happen. However since this is a live site I am not sure exactly how to and where to put code so it is transparent to the user and gives me the info I need. Maybe like a if then statement on the checkout_process to check $_POST variables and fail if blank, but where to send the customer I don't know. Maybe redirect back to the payment page or something. Any ideas.

4 Sep 2009, 11:44 PM
#13
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

This is exactly what is happening to me. I am still getting this randomly. Except for one customer that it seems to happen to everytime.

The CC info is not being passed. I tracked down the order process and found that in the order.php class there is an area that this area is commented out (in the original 1.3.8a files) under the function cart() which I believe is run if the order is new and no orderid is specified when the order class is called.

$this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,
                    'currency' => $_SESSION['currency'],
                    'currency_value' => $currencies->currencies[$_SESSION['currency']]['value'],
                    'payment_method' => $GLOBALS[$class]->title,
                    'payment_module_code' => $GLOBALS[$class]->code,
                    'coupon_code' => $coupon_code->fields['coupon_code'],
//                          'cc_type' => (isset($GLOBALS['cc_type']) ? $GLOBALS['cc_type'] : ''),
//                          'cc_owner' => (isset($GLOBALS['cc_owner']) ? $GLOBALS['cc_owner'] : ''),
//                          'cc_number' => (isset($GLOBALS['cc_number']) ? $GLOBALS['cc_number'] : ''),
//                          'cc_expires' => (isset($GLOBALS['cc_expires']) ? $GLOBALS['cc_expires'] : ''),
//                          'cc_cvv' => (isset($GLOBALS['cc_cvv']) ? $GLOBALS['cc_cvv'] : ''),
                    'shipping_method' => $_SESSION['shipping']['title'],
                    'shipping_module_code' => $_SESSION['shipping']['id'],
                    'shipping_cost' => $_SESSION['shipping']['cost'],
                    'subtotal' => 0,
                    'tax' => 0,
                    'total' => 0,
                    'tax_groups' => array(),
                    'comments' => (isset($_SESSION['comments']) ? $_SESSION['comments'] : ''),
                    'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR']
                    );

To me this seems important as later when the order is actually create the $this->info(cc_...) is entered into the database. I can't find any other place this info is set other then here and it is commented out. Makes me think but since it is commented out in the orginal file I dont know. Anyone have any thoughts...maybe a ZC developer can shed some light on this issue.

5 Sep 2009, 7:05 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC orders with no Authorize.net processing??

Those commented-out lines are unrelated to your randomly-occurring problem.
If they were related, then you'd have problems on every order, not just occasionally.

6 Sep 2009, 4:57 PM
#15
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Maybe that is true and maybe it isn't. There is obviously another object that is called to handle the pulling the cc variables and putting them into $this->info but I can't find it. It is possible that this object is not being properly called everytime (due to some yet unkown reason) resulting in the missing cc data. How else can you explain it.

6 Sep 2009, 5:47 PM
#16
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

I did some more searching around and found that the cc_info is processed in the authorizenet_aim.php module. I also noticed that it uses $_POST instead of $_SESSION could it be that this is the reason for the inconsistent processing. Somehow the variables are getting lost between posts. Wouldn't it be better to use $_SESSION instead $_POST.

6 Sep 2009, 6:08 PM
#17
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Another idea is that it completely skips this object all together. This would make sense because the gateway is contacted in this function and the debug info should be collected. However there is no debug info collected when the bad orders come through so the gateway is never contacted. This would seem to say that this function is never run. It is called in checkout_process.php and there is no criteria (if then statements or cases) for it to run so I can't see why it wouldn't run everytime. Any ideas

6 Sep 2009, 6:22 PM
#18
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: ZC orders with no Authorize.net processing??

How many payment modules do you have listed in Admin->Modules->Payment?
Which ones have green or yellow dots?
Which of those have their "enable" status set to "false"? And why?

6 Sep 2009, 7:15 PM
#19
phatkodi avatar

phatkodi

New Zenner

Join Date:
Jul 2008
Posts:
18
Plugin Contributions:
0

Re: ZC orders with no Authorize.net processing??

Only authorizenet_aim is enabled and set green everything else is red. Also ran this mysql query.
SELECT *
FROM configuration
WHERE configuration_key LIKE '%MODULE_PAYMENT_INSTALLED%'

which returned...

configuration_id configuration_title configuration_key configuration_value configuration_description
148 Installed Modules MODULE_PAYMENT_INSTALLED authorizenet_aim.php List of payment module filenames separated by a se...

I need to correct the last post. There is an if then statment for the before_process function. It is in the payment.php class

function before_process() {
if (is_array($this->modules)) {
if (is_object($GLOBALS[$this->selected_module]) && ($GLOBALS[$this->selected_module]->enabled) ) {
return $GLOBALS[$this->selected_module]->before_process();
}
}
}

This is run right before it calls the before_process function in authorizenet_aim.php. Maybe I should manually set the payment module in checkout_process.php when it calls the payment class...see below...

$payment_modules = new payment($_SESSION['payment']);

to

$payment_modules = new payment('authorizenet_aim']);

That would address your hunch that another module is set. After the payment class is called it runs a class constructor that sets the $this->modules and $this->selected_module which is what is checked when before_process function is called. I don't know but my gut tells me this is where the trouble starts. See the class constructor code below... It talks about freecharger.php but I don't know what that is?????.... Maybe the $_SESSION[payment] is getting lost or something. Changing the code above would address that too

// class constructor
function payment($module = '') {
global $PHP_SELF, $language, $credit_covers, $messageStack;

if (defined('MODULE_PAYMENT_INSTALLED') && zen_not_null(MODULE_PAYMENT_INSTALLED)) {
  $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);

  $include_modules = array();

  if ( (zen_not_null($module)) && (in_array($module . '.' . substr($PHP_SELF, (strrpos($PHP_SELF, '.')+1)), $this->modules)) ) {
    $this->selected_module = $module;

    $include_modules[] = array('class' => $module, 'file' => $module . '.php');
  } else {
    reset($this->modules);

    // Free Payment Only shows
    if (zen_get_configuration_key_value('MODULE_PAYMENT_FREECHARGER_STATUS') and ($_SESSION['cart']->show_total()==0 and $_SESSION['shipping']['cost']== 0)) {
      $this->selected_module = $module;
      if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . 'freecharger.php')) {
        $include_modules[] = array('class'=> 'freecharger', 'file' => 'freecharger.php');
      }
    } else {
      // All Other Payment Modules show
      while (list(, $value) = each($this->modules)) {
        // double check that the module really exists before adding to the array
        if (file_exists(DIR_FS_CATALOG . DIR_WS_MODULES . '/payment/' . $value)) {
          $class = substr($value, 0, strrpos($value, '.'));
          // Don't show Free Payment Module
          if ($class !='freecharger') {
            $include_modules[] = array('class' => $class, 'file' => $value);
          }
        }
      }
    }
  }

  for ($i=0, $n=sizeof($include_modules); $i<$n; $i++) {
    //          include(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $include_modules[$i]['file']);
   $lang_file = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/', $include_modules[$i]['file'], 'false');
    if (@file_exists($lang_file)) {
      include_once($lang_file);
    } else {
      if (IS_ADMIN_FLAG === false) {
        $messageStack->add(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
      } else {
        $messageStack->add_session(WARNING_COULD_NOT_LOCATE_LANG_FILE . $lang_file, 'caution');
      }
    }
    include_once(DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file']);

    $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class'];
  }

  // if there is only one payment method, select it as default because in
  // checkout_confirmation.php the $payment variable is being assigned the
  // $_POST['payment'] value which will be empty (no radio button selection possible)
  if ( (zen_count_payment_modules() == 1) && (!isset($_SESSION['payment']) || (isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) ) {
    if (!$credit_covers) $_SESSION['payment'] = $include_modules[0]['class'];
  }

  if ( (zen_not_null($module)) && (in_array($module, $this->modules)) && (isset($GLOBALS[$module]->form_action_url)) ) {
    $this->form_action_url = $GLOBALS[$module]->form_action_url;
  }
}

}