Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19
  1. #11
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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.

  2. #12
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

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

    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #13
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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.

  4. #14
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default 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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #15
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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. #16
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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.

  7. #17
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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

  8. #18
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default 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?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #19
    Join Date
    Jul 2008
    Posts
    18
    Plugin Contributions
    0

    Default 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;
    }
    }
    }
    Last edited by phatkodi; 6 Sep 2009 at 08:19 PM.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Duplicate orders with Authorize.net AIM
    By wk4hm in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 23 Dec 2010, 10:37 PM
  2. Authorize.net - New Processing Requirement
    By jweb1369 in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 21 May 2010, 06:34 AM
  3. Error processing cc transaction with authorize.net
    By keithck73 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 3 Mar 2009, 10:37 PM
  4. Odd problem with orders and authorize.net
    By rmn in forum General Questions
    Replies: 23
    Last Post: 22 Jul 2008, 09:41 AM
  5. Problem with CC Processing on Authorize.net Module
    By swelter83 in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 31 May 2008, 03:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg