Title: Missing Order(s)
Last modified: May 4, 2018

---

# Missing Order(s)

 *  Resolved [narrowback](https://wordpress.org/support/users/narrowback/)
 * (@narrowback)
 * [8 years ago](https://wordpress.org/support/topic/missing-orders-5/)
 * Hi there,
 * I have a few orders that appear on the payment gateway dashboard but do not have
   an equivalent order in woo. Woo pointing at gateway, gateway pointing at woo 
   but the theory they both have is that perhaps user closing browser before transaction
   completes.
 * I dont care who’s fault, I need a means to match orders when this happens.
 * I have asked woo if the order can be started and put into pending status BEFORE
   sending request to payment gateway and awaiting a response. They said thats how
   it should work, but the payment gateway plugin could be breaking this. I asked“
   If orders started before sending to gateway, how could any response from gateway
   delete the order? There must be record of it somewhere?” The answer was a nice
   but dismissive, anything can happen with bad gateway plugin.” Well, I dont buy
   it but we’re at an impasse.
 * The payment gateway folks (ETS – emoney.com) created this plugin but seems to
   be more skunkworks. No logging, No real support.
 * 99.9% of the transactions make it though, but its the remaining that I need to
   investigate and with no record at all on the woo side, which includes most of
   the customer contact details, it makes it impossible.
 * Questions:
    1) Any way to force woo to create order before submitting to payment
   gateway? 2) Any way to look up phantom orders elsewhere, like in database, or
   are they really not committed to DB until payment gateway responds? 3) Any specific
   advice I can force onto the payment gateway devs to break the impasse? 4) Strategies
   to keep user from closing browser before transaction completes? Warning message
   next to the Buy button not doing much,
 * Thanks for any and all responses.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [8 years ago](https://wordpress.org/support/topic/missing-orders-5/#post-10249570)
 * Hey there!
 * > I have asked woo if the order can be started and put into pending status BEFORE
   > sending request to payment gateway and awaiting a response. They said thats
   > how it should work, but the payment gateway plugin could be breaking this. 
   > I asked “If orders started before sending to gateway, how could any response
   > from gateway delete the order? There must be record of it somewhere?” The answer
   > was a nice but dismissive, anything can happen with bad gateway plugin.” Well,
   > I dont buy it but we’re at an impasse.
 * The correct workflow is as follows:
 * 1. Customer clicks “pay now” or whatever the equivalent is for that payment gateway
   
   2. Order is created in WooCommerce and set to pending (it’s immediately written
   to the database)
 * Then a bit of logic:
 * * If the order goes through and IPN is working, the order status is updated to“
   processing” and all is well
    * If the payment is canceled, usually the order 
   is set to “canceled”, though this can be tricky depending on the gateway * If
   the “hold stock” window (under Products > Inventory) is reached without payment
   being received, the order is set to “failed”
 * None of that can happen if the order isn’t created – which is why Woo creates
   the order so early in this process. If the payment gateway messes with that process,
   it messes up the entire payment process, which is why we’re so careful with third
   party payment gateways.
 * > 3) Any specific advice I can force onto the payment gateway devs to break the
   > impasse?
 * I don’t have any specific advice here. In these kinds of cases, I tend to recommend
   going with a different gateway that proves more reliable for you, such as Stripe.
 * > 4) Strategies to keep user from closing browser before transaction completes?
   > Warning message next to the Buy button not doing much,
 * This is a frustration for all e-commerce shop managers, as it does break the 
   process to a certain degree. Normally Woo catches this by already creating the
   order so at least there’s something to fall back on.
 * I’m sorry I can’t be more helpful, beyond supplying some background information
   for you! If you do have any further questions, I’ll do my best to help.
    -  This reply was modified 8 years ago by [Hannah S.L.](https://wordpress.org/support/users/fernashes/).
      Reason: Formatting
 *  Thread Starter [narrowback](https://wordpress.org/support/users/narrowback/)
 * (@narrowback)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/missing-orders-5/#post-10279958)
 * Thanks for the response. The creator of the gateway plugin is slow to respond.
 * How can I enable logging on the woocomerce side to see/trap issues like this?
   I still find it hard to reconcile that orders started in woocomerce can be created
   but not logged/stored in some way, regardless of what issue may exist on the 
   gateway plugin side.
 * Again it works most of the time so if I had way to go through logs to piece some
   orders back together that would work for now
 * Tom
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [7 years, 12 months ago](https://wordpress.org/support/topic/missing-orders-5/#post-10281106)
 * Hey there!
 * > How can I enable logging on the woocomerce side to see/trap issues like this?
   > I still find it hard to reconcile that orders started in woocomerce can be 
   > created but not logged/stored in some way, regardless of what issue may exist
   > on the gateway plugin side.
 * I think you’re coming at this from the wrong direction. Core WooCommerce handles
   this well with payment gateways that work correctly. When the gateway plugin 
   runs into issues, the issue is with the plugin and not necessarily with WooCommerce.
 * WooCommerce doesn’t have any further checks or logging, beyond what we’ve already
   mentioned. To handle this further, you’d need to write your own code – if you’d
   rather not do that yourself, I highly recommend contacting one of the services
   on our customizations page: [https://woocommerce.com/customizations/](https://woocommerce.com/customizations/)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Missing Order(s)’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * Last activity: [7 years, 12 months ago](https://wordpress.org/support/topic/missing-orders-5/#post-10281106)
 * Status: resolved