osCmax v2.5 User Manual
Results 1 to 8 of 8

unexplained redirect to login from checkout_payment

This is a discussion on unexplained redirect to login from checkout_payment within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; Hi all, I will try to provide as much info as I can. I need to get this fixed before ...

      
  1. #1
    Member habelson's Avatar
    Join Date
    Sep 2007
    Posts
    32
    Rep Power
    0


    Question unexplained redirect to login from checkout_payment

    Hi all,

    I will try to provide as much info as I can. I need to get this fixed before I go live. I am using the built in authorize.net module for osCMax. First I need to reference the following code

    from /includes/modules/payment/authorizenet.php

    Code:
    $result = $cc_validation->validate($HTTP_POST_VARS['authorizenet_cc_number'], $HTTP_POST_VARS['authorizenet_cc_expires_month'], $HTTP_POST_VARS['authorizenet_cc_expires_year'], $HTTP_POST_VARS['cvv'], $HTTP_POST_VARS['credit_card_type']);
          $error = '';
     switch ($result) {
      case -1:
       $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));
       break;
      case -2:
      case -3:
      case -4:
       $error = TEXT_CCVAL_ERROR_INVALID_DATE;
       break;
      case -5:
       $error = TEXT_CCVAL_ERROR_CARD_TYPE_MISMATCH;
       break;
      case -6;
       $error = TEXT_CCVAL_ERROR_CVV_LENGTH;
       break; 
      case false:
       $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;
       break;
     }
          if ( ($result == false) || ($result < 1) ) {
            $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&authorizenet_cc_owner=' . urlencode($HTTP_POST_VARS['authorizenet_cc_owner']) . '&authorizenet_cc_expires_month=' . $HTTP_POST_VARS['authorizenet_cc_expires_month'] . '&authorizenet_cc_expires_year=' . $HTTP_POST_VARS['authorizenet_cc_expires_year'];
            tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
          }
    This code checks the result of the cc_validation and then redirects to checkout_payment.php with an error result if there is an error. My problem is that if any one of the errors it is checking for actually occurs: instead of being redirected to the payment page with an error message, the customer is redirected to the login page and the osCsid changes. If you attempt to login at that point, you just keep geting redirected to the login page.

    I don't really know where to look to track down this problem. I have confirmed that it has something to do with the code snippet above because this problem only occurs when anyone of those errors occurs. Any help would be greatly appreciated.

    oh, and Happy Holidays!

  2. #2
    Member habelson's Avatar
    Join Date
    Sep 2007
    Posts
    32
    Rep Power
    0


    Default Re: unexplained redirect to login from checkout_payment

    anyone? This seems like a biggy. Granted 99% of my problems have been stupid oversites, but I really can't figure this one out.

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: unexplained redirect to login from checkout_payment

    I have not been able to reproduce this error, so I am thinking it is specific to your install. If you can send me a link to your site, I would be happy to take a look at it in action (if you want to keep the link private, send it in a PM).
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    Member habelson's Avatar
    Join Date
    Sep 2007
    Posts
    32
    Rep Power
    0


    Default Re: unexplained redirect to login from checkout_payment

    the addrress for my site is:

    http://cedarcreek.spiritgearnj.com

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: unexplained redirect to login from checkout_payment

    This most likely has to do with the mods you added to the shop. I noticed in the multi-stores thread that you are symlinking files, etc. I have never used the multi-stores mod, so I am not going to be much help with debugging.

    Try a fresh install without mods and see if the error still exists. If it does, I will need to know exactly how to reproduce it. If not...

    I would suggest starting with a stock store and reinstalling the mods on it, checking after each completed mod to see what change is actually causing the problem. Things like this can be very difficult to track down, especially after hacking in mods to the base code.

    Once you find the actual mod and code changes that are causing the problem, you can go about fixing it.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    Member habelson's Avatar
    Join Date
    Sep 2007
    Posts
    32
    Rep Power
    0


    Default Re: unexplained redirect to login from checkout_payment

    michael_s,

    thanks. I think my first step is going to be grabbing the original versions of the three files in question and replacing mine with them. If that doesn't fix it, I'll try what you suggest.

    All the multi-store mod really does is change a bunch of the products related SQL queries so that you can manage a relationship of products to individual store fronts. Obviously there is more too it than that, but I don't see how it could effect things in this manner. As far as symlinking... the error occurs on the base site that does not use the symlinks as well, so I don't think that is the problem either.

    You've given me a place to start though, I'll post back to here if I'm able to track it down. THanks,

    Heath

  7. #7
    Member habelson's Avatar
    Join Date
    Sep 2007
    Posts
    32
    Rep Power
    0


    Default Re: unexplained redirect to login from checkout_payment

    As usual, my problem was caused by my inexperence. I attempted to put the script block that does the CVV popup for authorize.net at the top of checkout_payment.tpl.php this is apparently what caused my error. I was just trying to find a more appropriate place to put it.

    Thanks for the help Michael.

    -Heath

  8. #8
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: unexplained redirect to login from checkout_payment

    Heath,

    You didn't mention that change

    Yeah, that javascript must go in the <head> section, and that is not in the content templates.

    To move it, you would need to create a new main_page.tpl.php with a different name, and then tell those pages to use it instead of the standard main page template. Then you would remove the javascript from the standard main page template, so it was only in the special checkout main page template...

    Whew!
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. display checkout_shipping and checkout_payment in one side
    By webkojan in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 09-02-2006, 08:10 AM
  2. Checkout confirm loops back to checkout_payment.php
    By hickaway in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 01-24-2006, 08:33 AM
  3. PlugnPay problem with checkout_payment.php in 1.7
    By kenlyle in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 08-28-2005, 07:58 PM
  4. Checkout_Shipping redirecting to checkout_payment.php
    By alexbranding in forum osCmax v1.7 Discussion
    Replies: 6
    Last Post: 03-15-2005, 03:44 PM
  5. Login Redirect not working
    By helixgroup in forum osCommerce 2.2 Installation Help
    Replies: 1
    Last Post: 01-12-2005, 07:05 AM

Bookmarks

Posting Permissions

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