Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Posts
    1
    Plugin Contributions
    0

    Default [Done v1.3.9] Paypal / Gift Certificates and the eternal checkout loop

    I have a customer who recently decided to sell gift certificates. I followed the instructions for setting up a gift certificate, and the tested a purchase. Everything tested fine until I confirmed the order in paypal. After confirming in paypal I get redirected back to step 2 of the checkout process on my clients website. After checking my bank, paypal has submitted a pre-authorization, but no emails were sent to the store manager email or the test customer email, and no new order shows up in the admin.

    This only happens when I set the model number on the certificate to GIFT-XXX. All other products test out fine.

    I am running version 1.3.8a on php 4.3.11. Paypal Website Payments Pro and Paypal Express Checkout are the only payment gateways that are enabled. The site is set up on a GoDaddy server, but I was told the problem occurred on another hosting server before I picked up the client and moved them to GoDaddy.

    Thanks

  2. #2
    Join Date
    Jun 2007
    Location
    Phoenix, AZ
    Posts
    69
    Plugin Contributions
    0

    Default Virtual Carts not Handled Correctly with Paypal WPP

    Hello all,

    While enabling gift certificates today I ran into a strange issue while trying to pay for them with PayPal Website Payments Pro. For orders with a pure virtual cart (only gift certificates in my case -- we sell physical products) I was redirected back to checkout_payment after clicking "confirm order" on step 3.

    Steps to reproduce:

    1. Start with a fresh session. Add a gift certificate (any amount) to your order.
    2. Proceed to checkout (log in, etc). checkout_shipping should be skipped for this cart as it contains no physical products.
    3. Select PayPal on checkout_payment.
    4. Click "confirm order" on checkout_confirmation.
    5. Log into PayPal. Verify the amount and click "continue."
      At this point you will be redirected to checkout_shipping. Zen Cart will then realize you have a virtual cart and redirect you to checkout_payment.
    6. At this point you are in a "special payment" so you can only enter comments, etc., not re-select your payment type. Proceed to checkout_confirmation.
    7. Click "confirm order."
    8. Run through the PayPal screens and your transaction will be successful.

    This looks to be an issue with Zen's handling of virtual carts. In paypalwpp.php line 1660 Zen checks for a virtual cart skips calling the paypalwpp->getOverrideAddress() function. Unfortunately, getOverrideAddress() is where the "markflow" GET variable is committed to a session variable. So, when we get to line 1732, $reviewOrder is left true and PayPal is told to display a "continue" button, rather than "confirm."

    I added the following fix to my paypalwpp.php file starting at line 1659. I added the one line above "} else {":
    Code:
        if ($_SESSION['cart']->get_content_type() == 'virtual' && isset($_SESSION['customer_id']) && $_SESSION['customer_id'] > 0) {
          $this->zcLog('ec-step1-addr_check', "cart contents is virtual and customer is logged in ... therefore options['NOSHIPPING']=1");
          $options['NOSHIPPING'] = 1;
          $_SESSION['paypal_ec_markflow']=(int)$_GET['markflow'];
        } else {
    For obvious reasons, I'm hesitant to tinker with the PayPal files. Can someone knowledgeable about Zen's PayPal system please take a look at this and verify that it's a valid fix?

    Thanks!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    The system intentionally goes to the checkout_payment page if you have coupon or gift certificate support enabled on your site, so that the customer can enter a coupon or gift cert redemption code before confirming final payment amount.
    .

    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
    Jun 2007
    Location
    Phoenix, AZ
    Posts
    69
    Plugin Contributions
    0

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    Quote Originally Posted by DrByte View Post
    The system intentionally goes to the checkout_payment page if you have coupon or gift certificate support enabled on your site, so that the customer can enter a coupon or gift cert redemption code before confirming final payment amount.
    Hi Dr. Byte,

    Yes, for an Express Checkout that is true. However, this isn't an express checkout, just a normal PayPal transaction. (I logged in using an existing account.) For virtual carts, the bug is displaying the checkout_payment page twice.

    The behavior is also not duplicated for physical carts.

    Also, it just occurred to me that I didn't post my version of Zen: 1.3.8a.
    Last edited by Tick; 11 Nov 2008 at 12:58 AM. Reason: Post Zen version.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    Well, if you're editing the paypalwpp.php file, you're dealing with Express Checkout ... so, I'm uncertain whether there's really a problem here.
    Website Payments Pro uses paypaldp.php.

    And, no, don't complain about the nomenclature of the filenames ... we've heard it lots.
    .

    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
    Jun 2007
    Location
    Phoenix, AZ
    Posts
    69
    Plugin Contributions
    0

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    Ok, I just checked my Zen config and you are correct. The payment module is "PayPal Express Checkout." The file being called is paypalwpp.php. My apologies, I made an assumption based on the filename.

    Now, to confuse the matter further...

    This is not an express checkout per se. I'm logging into Zen with a pre-existing account. I am not redirected to PayPal until after (the first) checkout_confirmation.

    Thanks for your help!

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    So, you're just saying that it's looping through the checkout pages one extra time?
    .

    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.

  8. #8
    Join Date
    Jun 2007
    Location
    Phoenix, AZ
    Posts
    69
    Plugin Contributions
    0

    Default Re: Virtual Carts not Handled Correctly with Paypal WPP

    Quote Originally Posted by DrByte View Post
    So, you're just saying that it's looping through the checkout pages one extra time?
    Yes, sir.

 

 

Similar Threads

  1. v151 Checkout without Account and Gift Certificates
    By Minerva35 in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 3 Jan 2013, 10:23 PM
  2. [Done v1.5.0] Gift Certificates Will Not Release
    By jacdesigner in forum Bug Reports
    Replies: 10
    Last Post: 29 Dec 2010, 07:39 PM
  3. Can I prevent Gift Certificates from being bought with Gift Certificates?
    By Brianwocky in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 21 Dec 2010, 07:11 PM
  4. Caught in weird PayPal Loop using Fast and Easy Checkout!
    By eyal8r in forum All Other Contributions/Addons
    Replies: 11
    Last Post: 3 Apr 2010, 01:44 AM
  5. PayPal Express AND Gift Certificates -- can this be accelerated?
    By tfortan in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 13 Feb 2010, 03:20 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR