Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Retaining a session ID from a module

    It seems that whenever I start a project with Zen Cart, it is simple, and then I try to make it complicated and get myself into trouble. That is where I am now.

    The short version is that I am attempting to adapt a payment module (Moneris) that is out of date and for the wrong merchant system to work with the payment vendor's current API. I am having a fair amount of success, but I have found that I cannot retain the customer's session when the vendor returns to Zencart. I am sending the session ID in a misc field to the merchant, and they simply echo it back to me, so I have that information in the POST that they are sending. I cannot however figure out how to reintegrate that into the checkout_process.php and would love some help.

    Here is the work flow:

    [-] Customer chooses payment type for this module.
    [-] The form builds on the checkout_confirmation.php page.'
    [-] The customer clicks confirm, and the browser is redirected to the merchant's site with the POST info they need to process the payment.
    [-] The merchant then redirects the browser back to my cart's checkout_process.php page.
    [-] The cart fails out of that page and lands the customer on mainpage=time_out as the session isn't holding through that transfer.

    Again, any help you may be able to provide would be awesome!
    Thanks!

  2. #2
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Retaining a session ID from a module

    I am really hoping that there is an answer out there as I have spent another full day on this issue. I am trying to find a way to retain a session when redirecting my browser out of Zencart and back in. I have passed back in the zenid when landing on the checkout_process page, however, it doesn't maintain the session. I know that other payment modules like Paypal must handle this somehow, but their code doesn't seem to be helping me. Any advice from anyone who has worked in this area would be a great help!

    Thanks!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Retaining a session ID from a module

    Normally the session IS retained.

    Possible causes of your problem:
    - using IE8
    - taking more than 25 minutes to return to store
    - cookies disabled in browser, preventing session from working
    .

    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.

  4. #4
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Retaining a session ID from a module

    rats - I was really afraid that you were going to say that. I've tested using Chrome, FF, and IE8, cookies are enabled, and I am away from the store for less that 10 seconds.

    The payment company has in their config a space to enter the return URL, and with your information, it seems likely that this is were I am messing up. I have the vendor returning to the cart at /index.php?main_page=checkout_process.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Retaining a session ID from a module

    That is the recommended return point for all modules.
    .

    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.

  6. #6
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Retaining a session ID from a module

    That is good to know. Thanks for the input. It has got to be something simple that I am missing, now that I have had a night's sleep, I'll see if something jumps out at me that I've been missing.

  7. #7
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Retaining a session ID from a module

    Hi Dr. Byte and all,

    I am very much at my wits end on this and I would love some more help and advice from someone anyone who is interested in helping me de-stress a bit

    Here is the scoop - the session isn't retained when the merchant returns me the user to Zencart. The payment module requires a POST to the vendor's site. This works without issue. The vendor processes the info and then POSTs a response back to index/checkout_process.php. However, every time the response comes back, Zencart displays a "Whoops! Your session has expired." message. I am away from Zencart for only a moment, and I have tried dozens of things to figure out why this isn't working, all without any luck. Watching the data move back and forth, I have confirmed that the Zen cookie exists, contains the correct session ID and is being called when the payment vendor returns to zencart.

    I don't get it! I am afraid I need more help.

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

    Default Re: Retaining a session ID from a module

    Do you have the same problem with any other gateway modules? esp the built-in ones?
    .

    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. #9
    Join Date
    Mar 2007
    Location
    Seattle, WA
    Posts
    159
    Plugin Contributions
    0

    Default Re: Retaining a session ID from a module

    No - I use Authorize.net AIM and the PO modules and they both work without issue (thank goodness ) - it appears to only be this module. As far as I know though, neither of those redirect to an external page, do they?

  10. #10
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: Retaining a session ID from a module

    Correct - those modules do no redirects.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Cart not retaining items for a customer using IE 7
    By grakowsky in forum General Questions
    Replies: 0
    Last Post: 28 Jun 2012, 01:59 AM
  2. Retaining data in form submission
    By ethangreen in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 2 Jun 2009, 08:53 PM
  3. cart no retaining items
    By gsdcypher in forum General Questions
    Replies: 1
    Last Post: 27 Jan 2008, 04:55 PM
  4. Retaining Sold Out Products in Catalog
    By hunterw in forum Setting Up Categories, Products, Attributes
    Replies: 11
    Last Post: 23 Jul 2007, 04:06 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