omise / omise-woocommerce

Omise WooCommerce Plugin
https://docs.opn.ooo/woocommerce-plugin
MIT License
47 stars 27 forks source link

Double event notification on payment (resulting in double emails) #164

Closed davidsneighbour closed 3 years ago

davidsneighbour commented 4 years ago

We are forced to use Omise 3D Secure with our shop. Often times when people pay we and them receive two notifications about this, resulting in confusion about the amount of orders. People think they ordered and paid twice. The logs show that the payment event is thrown/logged twice:

Selection_058

The dashboard in Omise shows only one single charge.

These things happen quite often and always payment via 3D secure fail first, then they work and result in notifications twice.

Let me know if you need charge IDs to find out specific info.

davidsneighbour commented 4 years ago

Please note that the event is definitely processed twice within WooCommerce. In another sample the stock count goes from 2 to 1 and from 1 to 0 in the first four logs.

Selection_059

guzzilar commented 4 years ago

@davidsneighbour Hi, thank you for reporting in. May I understand the situation a bit more? As mentioned "often times", meaning that sometimes this does not happen (if so, may I know when was the first time it started to log twice) ? Or, does it always happen since the very beginning when you started using Omise-WooCommerce?

Also may I know what WooCommerce and WordPress version you are currently using?

davidsneighbour commented 4 years ago

We recently started using Omise and since we started the issues came up. I opened an issue yesterday because at first it appeared that lots of orders failed to be paid when coming from the US. So we were advised to use the new omise.js form with address fields for better verification. (see #163). But diving deeper into the issue I can see a pattern where we receive two emails per order and the customer receives two emails per order, if it works. We never tried without 3DS, so we don't have info if that is a factor.

Wordpress: 5.4 WooCommerce: 4.0.1 Omise Payment Gateway: 3.11

My customer (owner of the WordPress site) says, from 10 orders 2 or three go through without issue. And from two sample orders that I have access to it appears the doubles come after initial payment failed.

Let me know if you need transaction IDs to trace that inside of Omise.

guzzilar commented 4 years ago

@davidsneighbour thanks for the detail. I'll try to reproduce this issue first then will update you the result. (also, thanks for the suggestion on #163, and sorry that we didn't reply it)