Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Dec 2003
    Posts
    145
    Plugin Contributions
    0

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    I don't have the freecharger or moneyorder modules enabled. PayPal EC & IPN are. What I'm getting at is this conditional, which only kicks in when one payment module is enabled.

    https://github.com/zencart/zencart/blob/v151/includes/classes/payment.php#L84-L89


    I have a custom template and a handful of overrides. It may very well be my mods, but I've already dug through them and none of it sets
    Code:
    $_SESSION['payment'] = NULL; // or an equivalent
    As stated originally, I'd really like a point in the right direction, not just "it works on my box."
    Last edited by texdc; 10 Jun 2014 at 04:08 AM.

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

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    Quote Originally Posted by texdc View Post
    As stated originally, I'd really like a point in the right direction, not just "it works on my box."
    Sigh. You seem to always hate my replies. Doesn't make me want to help you. I wish we could get past that. The purpose of my reply was NOT to crassly say "it works on my box". It was to engage you in discussion to understand more about exactly how *you* are triggering the scenario because it does appear to be environment-specific.
    .

    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. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    Quote Originally Posted by texdc View Post
    Thanks. But, please try again with multiple payment types enabled: AIM, cod, Paypal.
    Your earlier post specifically said you were only using AIM.
    Then when I replied saying I couldn't recreate the problem (using the limited information about your environment), you said to use more payment modules.
    And then when I asked for clarification about *which* PayPal module (again because of limited information in your post), you said you're getting at a conditional related to using only one payment module:
    Quote Originally Posted by texdc View Post
    I don't have the freecharger or moneyorder modules enabled. PayPal EC & IPN are. What I'm getting at is this conditional, which only kicks in when one payment module is enabled.
    Further, you state "PayPal EC and IPN are [enabled]". But, Zen Cart is specifically coded to *prevent* you from having both EC and Standard enabled at the same time (IPN being commonly referred to as the colloquial name for PayPal Standard).

    Either way, if this is indeed related to the code that specifically fires when only one payment module is enabled, I'm having trouble correlating that to the subject of your post: "php 5.4+ missing payment type in $_SESSION on checkout_process". I spent quite a bit of time investigating which PHP 5.4 issues could be causing it, and came up dry. Hence my earlier post asking for more information about your environment.
    .

    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
    Dec 2003
    Posts
    145
    Plugin Contributions
    0

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    What we have is a failure to communicate. As I've said, my problem here could very well be my code, but I've combed through it to no avail and was looking for direction.

    Now, I've disabled IPN and left EC enabled to see if there's a conflict there (even though it's not used) but the result is the same. So, are you able to debug the ZC code efficiently? If so, I'd really like to know how. Unit tests go a long way to preventing bugs and proving that things work not just on the dev's box. But, I'm not here to complain - though complaint is certainly justified. I just need help fixing a severe problem. If the only places where
    Code:
    $_SESSION['payment'] =
    occurs is ZC core (not my mods), then how can I assume that it's my code and not yours?

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

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    Quote Originally Posted by texdc View Post
    Unit tests go a long way to preventing bugs and proving that things work not just on the dev's box.
    Agreed entirely. But, someone has to write them. And as you know, procedural code doesn't lend itself well to unit tests.
    And that's a discussion we've already had in other forum channels.
    That said, thanks for your recent PR's for v1.6.0.
    .

    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
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    $_SESSION['payment'] is only reset during processing if $credit_covers is true, and that happens only when the order-total modules determine that any discounts (coupons, gift certificates, etc) equal or exceed the total purchase price, thus determining that there is no payment required. And in that case the store expects that you also have the freecharger module enabled so that it can catch that 0.00 price scenario and complete checkout without requiring payment.

    I see from your var_dump that you have $_SESSION['cc_id'] set, which indicates that the system attempted to process a coupon.
    And, you stated later that you don't have freecharger enabled.

    Does enabling freecharger help?
    .

    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.

  7. #7
    Join Date
    Dec 2003
    Posts
    145
    Plugin Contributions
    0

    Default Re: php 5.4+ missing payment type in $_SESSION on checkout_process

    I've been swamped @ work and added a hack to keep things working until I could dig deeper into this. Here's my solution: `session_write_close()` should be called at the end of every page/script. `zen_session_close()` needs to be fixed:
    PHP Code:
    function zen_session_close() {
      
    session_write_close();


 

 

Similar Threads

  1. Having problem with order.php and checkout_process.php with OLD Zen Cart v1.2.3
    By wolfbane01 in forum Managing Customers and Orders
    Replies: 0
    Last Post: 28 Jul 2010, 01:56 AM
  2. Replies: 3
    Last Post: 10 Apr 2009, 10:37 PM
  3. PHP / $_SESSION help please
    By Jeff G in forum General Questions
    Replies: 2
    Last Post: 6 Oct 2008, 06:17 AM
  4. Checkout_process.php never displayed
    By mdorsey in forum Managing Customers and Orders
    Replies: 2
    Last Post: 18 Aug 2006, 04:08 AM

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