Page 1 of 4 123 ... LastLast
Results 1 to 10 of 35
  1. #1
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Order Confirmation Processing Block .. vs duplicate orders

    I recently switched from Fast and Easy Checkout page to the native checkout.

    Although I prefer the native, I am getting a lot of duplicate orders - presumably from people clicking the button multiple times or some other impatient actions.

    Does anyone have a link to tools that throw up the 'processing' image and block activity on the page while checkout is processing?

    I believe this is usually handled by using BlockUI, but I haven't found the right implementation yet.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Order Confirmation Processing Block

    The default/native checkout in v1.5.4 already does "double-click prevention" on the checkout_confirmation page (where final payment is usually submitted) ... by using some brief javascript to disable the Submit button after it is clicked.
    .

    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
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Order Confirmation Processing Block

    When an order is placed, what is it that clears the cart?

    I'm trying to figure out how a duplicate is even possible since normally when an order goes in everything gets cleared from the cart,etc.

    Thanks for any help you can give in pointing me in the right direction.

    In some instances it seems the customer was given a 'decline' message in regards to their credit card - even though the order apparently went through.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Order Confirmation Processing Block

    After the order is created, a command is run to tell the cart to clear itself.
    So, if yours isn't clearing it, then that suggests the order isn't being saved properly due to some error which is stopping all further actions.
    You need to address those errors.
    .

    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.

  5. #5
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Order Confirmation Processing Block

    I am still having a duplicate order issue.

    The template I'm using is Tableau and I have suspicions it is related to that (a Numinix rep also guessed as much as they are attempting to troubleshoot for me with no luck.)

    Zen Cart 1.5.4
    Using both Paypal Payments Pro and Express Checkout

    I dug into the access logs based on comments from DrByte in another thread. Here is the logs related to one duplicate:

    Code:
    71.205.104.180 - - [06/Jul/2016:00:33:37 -0400] "POST /index.php?main_page=checkout_process HTTP/1.1" 302 20 "https://www.-----.com/index.php?main_page=checkout_confirmation" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
    173.0.81.1 - - [06/Jul/2016:00:33:49 -0400] "POST /ipn_main_handler.php HTTP/1.1" 200 - "-" "PayPal IPN ( https://www.paypal.com/ipn )"
    71.205.104.180 - - [06/Jul/2016:00:33:40 -0400] "POST /index.php?main_page=checkout_process HTTP/1.1" 302 20 "https://www.-----.com/index.php?main_page=checkout_confirmation" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
    71.205.104.180 - - [06/Jul/2016:00:33:54 -0400] "GET /index.php?main_page=checkout_success&zenid=4d31995ddc8f20af217bb11c1a297c95 HTTP/1.1" 200 9623 "https://www.-----.com/index.php?main_page=checkout_confirmation" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
    71.205.104.180 - - [06/Jul/2016:00:33:55 -0400] "GET /min/?f=/includes/templates/tableau/css/checkout_success.css,/includes/templates/tableau/css/auto_loaders/ajaxcartslide.css,/includes/templates/tableau/css/auto_loaders/jquery.fancybox.css&1444859563 HTTP/1.1" 200 2740 "https://www.-----.com/index.php?main_page=checkout_success&zenid=4d31995ddc8f20af217bb11c1a297c95" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
    173.0.81.1 - - [06/Jul/2016:00:33:53 -0400] "POST /ipn_main_handler.php HTTP/1.1" 200 - "-" "PayPal IPN ( https://www.paypal.com/ipn )"
    I realize this is a near impossible issue to dig into given I have a lot of custom coding, but any help would be appreciated. Just point me in the direction to dig.

  6. #6
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,908
    Plugin Contributions
    96

    Default Re: Order Confirmation Processing Block

    Does the issue occur for both PayPal payment methods?

    You could try turning on the payment methods' debug so that you'll see the processing performed by the ipn_main_handler; that would give you some clues as to how/why that processing is being invoked after the checkout_success page.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Order Confirmation Processing Block

    Maybe the IPN from PayPal is inserting a duplicate. The PHP code protects against that, but if you've altered the way checkout works then the processing of IPN notices might not be able to detect the duplicate so is inserting a new order for you.
    Affected files are:
    /ipn_main_handler.php
    /includes/auto_loaders/paypal.core.php (and all the files mentioned inside it)
    /includes/modules/payment/paypal/functions_paypal.php

    One quick test (assuming you're always getting duplicates, and can trigger the problem on-demand) might be:
    1. Disable IPN Notifications within your PayPal Account
    2. Then do a transaction that's previously been triggering duplicates and see whether a duplicate appears.

    The downside to turning off the IPN notifications is that your store will not be notified of updates/alterations to transactions, such as refunds, or payments that weren't fully authorized until reviewed or captured. In those cases you'll need to manually add your own notes to affected orders and update the status of those orders whenever an update is done on the PayPal end (usually they email you, but not always).

    Another test is to use the Admin->Customers->PayPal report to look at the activity related to those duplicate orders. The "memo" field of the paypal history record will say something like "Order added due to incoming IPN notice" when an order is created via IPN.



    Unfortunately the v155 versions of the above files cannot be used on v154 without accommodating some db changes and some new functions that were added, so applying bugfixes would have to be done manually. (Notable fixes are changing $scheme to https instead of http, and changing $ipn_logging to ipn_logging).



    That said, if you were to investigate the code in ipn_main_handler and paypal_functions to understand how it attempts to detect "new" vs "existing" orders and come up with more data to help identify duplicates, perhaps PayPal has been changing something that needs to be accounted for. This would require enabling debug logging within PayPal Express/Pro, and perhaps a manual override to trigger IPN logging in order to monitor how it's treating incoming transactions and determine whether it's missing certain signals that could help identify duplicates vs believing it needs to insert a new record.


    Hope that's helpful.
    .

    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
    Posts
    474
    Plugin Contributions
    2

    Default Re: Order Confirmation Processing Block

    Quote Originally Posted by lat9 View Post
    Does the issue occur for both PayPal payment methods?

    You could try turning on the payment methods' debug so that you'll see the processing performed by the ipn_main_handler; that would give you some clues as to how/why that processing is being invoked after the checkout_success page.

    Yes. And it used to occur for the authorize.net module as well.

  9. #9
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

    Default Re: Order Confirmation Processing Block

    DrByte,
    The duplicate issue doesn't occur on every order and has occurred in the past when using Authorize.net so I don't think it is related to Paypal. That being said I did look into the things you mentioned.

    The solution here is probably for me to switch away from Tableau and use the new one provided in 1.5.5. The problem is that getting my existing site(s) to look the same using a new template isn't a quick fix. I'm also surprised, because I couldn't find any other mention of this issue related to Tableau. I'm going to custom replace the includes/templates/tableau/templates/tpl_checkout_confirmation_default.php and see if that fixes anything.


    When looking at Admin->Customers->PayPal there are no notes, only a link to the order (whereas refunded items include additional notes.)

    There are no changes to:
    /ipn_main_handler.php
    /includes/auto_loaders/paypal.core.php (and all the files mentioned inside it)
    /includes/modules/payment/paypal/functions_paypal.php

    Although the part 'ad all the files mentioned inside it' was not double checked.
    Last edited by lindasdd; 6 Jul 2016 at 03:30 PM.

  10. #10
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,911
    Plugin Contributions
    13

    Default Re: Order Confirmation Processing Block

    have you tried placing any test orders? in my experience, duplicate orders are related to problems with sending the order email.

    the sequence goes something like this:

    - customer hits button to place order
    - timeout issue occurs due to email problem
    - customer sees error on screen, and browser asks if customer wants to resubmit form.
    - customer proceeds to do so; and second order is placed.

    ZC does NOT clear the cart after the order gets created: that happens after the email gets sent.

    see:

    https://www.zen-cart.com/showthread....11#post1312911
    https://www.zen-cart.com/showthread....41#post1311441
    https://www.zen-cart.com/showthread....45#post1302345

    good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Duplicate Orders/Order Confirmation
    By Beer_man in forum Managing Customers and Orders
    Replies: 130
    Last Post: 16 Sep 2017, 07:10 PM
  2. v150 v1.5 Duplicate order processing at certain times of the day
    By NWCE in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 24 Sep 2013, 12:10 AM
  3. No order details and duplicate orders??
    By sailsport1 in forum PayPal Website Payments Pro support
    Replies: 8
    Last Post: 6 Jun 2011, 09:06 PM
  4. Duplicate Order Confirmation Emails
    By chrismarie in forum General Questions
    Replies: 2
    Last Post: 15 Mar 2010, 05:02 PM
  5. Replies: 49
    Last Post: 23 Feb 2010, 08:52 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