Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    62
    Plugin Contributions
    0

    Default Session Timeout when returning from Payment Gateway after more than 1 minute

    Zencart Version : 1.5.4
    Server : Amazon ZWS Lightsail
    OS : Linux
    PHP Version : 5.6.40

    Hi Experts

    We are facing a very different kind of issue on my website. Some customers are complaining that they are not able to place the orders as when they make the payment, the amount is deducted but on returning back to the website it shows

    "Whoops! Your session has expired.
    If you were placing an order, please login and your shopping cart will be restored. You may then go back to the checkout and complete your final purchases.

    If you had completed an order and wish to review it, or had a download and wish to retrieve it, please go to your My Account page to view your order."



    Then i tried it myself and after lot of testing I found that the issue is there on 2 of 3 of my payment gateway (Paytm and Payu) and not on Paypal. It occurs for some users (including me) who are using google chrome (not all of them) including me.


    Please also note the following points:
    i) It occurs if I stay on the payments page for exactly more than 1 minute
    ii) I have received all complaints from Google Chrome
    iii) On Paypal, this issue is not seen but only on PayTM and PAyu Payment Gateways
    iv) I see that the some session parameters related to customer are missing when it comes back after 1 minute and hence due to the below condition on /includes/modules/checkout_process.php the parameter customer_id is missing from session and hence, it is getting redirected to the timeout page.

    PHP Code:
    // if the customer is not logged on, redirect them to the time out page
      
    if (!$_SESSION['customer_id']) {
        
    zen_redirect(zen_href_link(FILENAME_TIME_OUT));
      } else {
        
    // validate customer
        
    if (zen_get_customer_validate_session($_SESSION['customer_id']) == false) {
          
    $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL''page' => FILENAME_CHECKOUT_SHIPPING));
          
    zen_redirect(zen_href_link(FILENAME_LOGIN'''SSL'));
        }
      } 

    v) Below are the session parameter if i press back button before 1 minute and after 1 minute:

    Before 1 minute:

    PHP Code:
    array(39) { ["securityToken"]=> string(32"c2433696283beec7edb06bc0c3e2fd10" ["customers_host_address"]=> string(52"abts-north-dynamic-170.132.69.182.airtelbroadband.in" ["cartID"]=> string(5"58868" ["cart"]=> object(shoppingCart)#5 (12) { ["contents"]=> array(1) { [24016]=> array(1) { ["qty"]=> string(1) "1" } } ["total"]=> float(425) ["weight"]=> int(0) ["cartID"]=> string(5) "58868" ["content_type"]=> string(8) "physical" ["free_shipping_item"]=> int(1) ["free_shipping_weight"]=> int(0) ["free_shipping_price"]=> float(425) ["download_count"]=> int(0) ["total_before_discounts"]=> float(425) ["display_debug_messages"]=> bool(false) ["flag_duplicate_msgs_set"]=> bool(false) } ["language"]=> string(7) "english" ["languages_id"]=> string(1) "1" ["languages_code"]=> string(2) "en" ["check_valid"]=> string(4) "true" ["navigation"]=> object(navigationHistory)#16 (2) { ["path"]=> array(1) { [0]=> array(4) { ["page"]=> string(16) "checkout_process" ["mode"]=> string(3) "SSL" ["get"]=> string(0) "" ["post"]=> array(0) { } } } ["snapshot"]=> array(0) { } } ["currency"]=> string(3) "INR" ["today_is"]=> string(10) "2020-07-19" ["updateExpirations"]=> bool(true) ["session_counter"]=> bool(true) ["customers_ip_address"]=> string(14) "182.69.132.170" ["customer_id"]=> string(5) "25084" ["customer_default_address_id"]=> string(5) "61180" ["cart_address_id"]=> string(5) "61180" ["sendto"]=> string(5) "61180" ["customers_authorization"]=> string(1) "0" ["customer_first_name"]=> string(7) "Harshit" ["customer_last_name"]=> string(9) "Chowdhary" ["customer_country_id"]=> string(2) "99" ["customer_zone_id"]=> string(3) "312" ["valid_to_checkout"]=> bool(true) ["cart_errors"]=> string(0) "" ["payment"]=> string(12) "paywithpaytm" ["cart_country_id"]=> string(2) "99" ["country_info"]=> array(3) { ["countries_name"]=> string(5) "India" ["countries_iso_code_2"]=> string(2) "IN" ["countries_iso_code_3"]=> string(3) "IND" } ["shipping_weight"]=> int(0) ["total_weight"]=> int(0) ["total_count"]=> int(1) ["receive_firstname"]=> string(7) "Harshit" ["billto"]=> string(5) "61180" ["send_firstname"]=> string(7) "Harshit" ["shipping"]=> array(3) { ["id"]=> string(23) "freeshipper_freeshipper" ["title"]=> string(35) "FREE SHIPPING! (No Delivery Charge)" ["cost"]=> float(0) } ["comments"]=> string(0) "" ["dropdown"]=> string(3) "( )" ["sorderid"]=> string(18) "ORDR_5f146aa00a2cd" ["category_tree"]=> object(SimpleCategoriesTree)#44 (8) { ["category_tree"]=> array(1057) { [811]=> array(9) { ["name"]=> string(14) "All Time Gifts" ["image"]=> NULL ["description"]=> string(57) " 
    After 1 minute

    PHP Code:
    array(15) { ["securityToken"]=> string(32"82ef3986fde32ff13d558ace6ac34740" ["customers_host_address"]=> string(52"abts-north-dynamic-170.132.69.182.airtelbroadband.in" ["cartID"]=> string(0"" ["cart"]=> object(shoppingCart)#5 (11) { ["contents"]=> array(0) { } ["total"]=> int(0) ["weight"]=> int(0) ["content_type"]=> bool(false) ["free_shipping_item"]=> int(0) ["free_shipping_weight"]=> int(0) ["free_shipping_price"]=> int(0) ["download_count"]=> int(0) ["total_before_discounts"]=> int(0) ["display_debug_messages"]=> bool(false) ["flag_duplicate_msgs_set"]=> bool(false) } ["language"]=> string(7) "english" ["languages_id"]=> string(1) "1" ["languages_code"]=> string(2) "en" ["check_valid"]=> string(4) "true" ["navigation"]=> object(navigationHistory)#28 (2) { ["path"]=> array(1) { [0]=> array(4) { ["page"]=> string(16) "checkout_process" ["mode"]=> string(3) "SSL" ["get"]=> string(0) "" ["post"]=> array(0) { } } } ["snapshot"]=> array(0) { } } ["currency"]=> string(3) "INR" ["today_is"]=> string(10) "2020-07-19" ["updateExpirations"]=> bool(true) ["category_tree"]=> object(SimpleCategoriesTree)#8 (8) { ["category_tree"]=> array(1057) { [811]=> array(9) { ["name"]=> string(14) "All Time Gifts" ["image"]=> NULL ["description"]=> string(57) " 

    Request someone to kindly help. I am stuck completely here.

    Regards
    Harshit

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,518
    Plugin Contributions
    8

    Default Re: Session Timeout when returning from Payment Gateway after more

    Opening another thread is not helpful and just confuses matters for those trying to help.

    I don't know that there are many on the forum that might use a payment gateway specific to India. That may be the reason for no replies at this time.

    Since Paytm advertises a specific Plugin (https://developer.paytm.com/docs/plu...webIntegration), have you contacted them? It does appear that they are set for 1.5.6c where you state you are using 1.5.4. That could be a problem as well as the outdated PHP of 5.6.40.

    Does your setup look anything like that at https://developer.paytm.com/docs/zencart/?
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

  3. #3
    Join Date
    Jan 2009
    Posts
    62
    Plugin Contributions
    0

    Default Re: Session Timeout when returning from Payment Gateway after more

    Hi dbltoe

    Sorry for posting on 2 forums as I didnt get a response there and thought people are not visiting that forum and hence pasted here. I tried to delete the old one, but couldn't get the option. Apologies again.

    I have contacted Paytm, but no resolution so far. It is very strange issue. In the readme that they have provided, it says, 1.5.x so i went ahead and integrated. If I upgrade my PHP version, lot of things stop working and I am not able to test.

    Can you please suggest some other solution?

    Regards
    Harshit

  4. #4
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    7,518
    Plugin Contributions
    8

    Default Re: Session Timeout when returning from Payment Gateway after more

    Most of the frequent flyers here on the forum will use the Newest Forum Posts when visiting the forum. It lets us see all the new posts since the last time we were on the forum. It's difficult to make a post without several people seeing it.

    Adding better descriptions of the problem will get help much quicker. The "Payment Gateway not Working" may not get looked at as fast as "payTM Gateway Problems."

    In the case of upgrading, it can be easy if you have cPanel and can control your PHP settings.

    Using the instructions at https://docs.zen-cart.com/user/first...t-using-cpanel can get you a test site quickly BUT, you will need to change the way it's done just a little.

    Rather than load the ZC zip file in the root (normally /public_html) you would go up one level to / (or home/) and upload the ZC file to that folder. I would use 1.5.6c for now until you know that the payment module has been upgraded for 1.5.7.

    Anyway, once you upload the zip file, extract it and rename the folder to _test.

    Next go to the subdomains area of cPanel and create the subdomain 'test' (without the ' ') and point the subdomain to /_test. You now have a test.your_domain.com.

    Create a database to use for the test site.

    Set the PHP for the test.your_domain.com to whatever PHP the payTM plugin requires.

    Run test.your_domain.com/zc_install and let the installer do it's thing.

    This will keep your current site running while you test a newer version. You cannot have a subdomain at the same level as your_domain.com as the PHP manager can not set separate versions for the domain and sub-domain. With the sub-domain "above the root", the system can give it a viable PHP version and not mess with the your_domain.com.
    Did you read the posting tips?!?
    Responsive Color Changes for 155-156c demo here.
    Zen Cart PCI Compatible Hosting

 

 

Similar Threads

  1. v151 Session Expires when returning from Payment Gateway for a second time
    By RickyDicky in forum Addon Payment Modules
    Replies: 9
    Last Post: 15 Nov 2014, 02:17 AM
  2. Returning from external payment gateway
    By kamion in forum Addon Payment Modules
    Replies: 1
    Last Post: 16 Jan 2012, 06:04 AM
  3. Replies: 3
    Last Post: 6 Feb 2009, 12:25 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR