• Resolved ttoaster

    (@ttoaster)


    Hi,

    Great plugin which I highly recommend over the “official’ Woocommerce one.

    I noticed that when customers place an order that uses iDEAL payments, both they (the customer) and I (the site owner) gets two emails each time (both for order placed and order completed).

    Can you please look into this and fix it? It isn’t a show stopper, but it will cause some customers to question if they have been charged twice (they haven’t).

    Regards,
    Martin

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ttoaster

    Thanks for contacting us. The Stripe plugin does not control the order email logic, that is controlled by WooCommerce.

    The order email logic is triggered anytime the order’s status is updated. When a payment is processed, the Stripe plugin calls the WC_Order::payment_complete method which is when WooCommerce takes over and does things like sending emails.

    It sounds like you might have a plugin on your site that’s triggering the email notifications twice. Take a look at your order notes and see if the order’s status is transitioning from pending > completed or pending > processing just once or if it’s happening multiple times.

    Kind Regards

    Thread Starter ttoaster

    (@ttoaster)

    Hi,

    This is not happening with any other payment methods, only iDEAL, see the order notes for the latest one (sanitised for privacy):

    payment_intent.succeeded webhook received. Payment has been completed. 10th June 2023 at 15:20 Delete note

    Order charge successful in Stripe. Charge: py_XXXXXXXXXXXXtx498. Payment Method: iDEAL 10th June 2023 at 15:20 Delete note

    Order charge successful in Stripe. Charge: py_3XXXXXXXXXXXXtx498. Payment Method: iDEAL 10th June 2023 at 15:20 Delete note

    Order status changed from Pending payment to Completed. 10th June 2023 at 15:20 Delete note

    Order status changed from Pending payment to Completed. 10th June 2023 at 15:20 Delete note

    I don’t have any other plugins that change the order email processing logic.

    Regards,
    Martin

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ttoaster

    Thanks for the order notes. I see that there are duplicate entries for the order status change and order charge success message. That would indicate you have 2 requests being received by your server at the same time.

    Do you have a duplicate webhook setup? You can confirm this by going to stripe.com > developers >webhooks. If there are no duplicate webhooks, check your webserver configurations if you’re using NGINX as a proxy. Sometimes if NGINX is mis-configured it can send duplicate requests.

    Something is causing 2 requests to come in at the same time. The requests are so close together that the order’s status is not being updated in the database before the next request gets processed. The emails are sent by WooCommerce when the order’s status transitions from pending to completed thus resulting in the duplicate emails.

    This is not reproducible on our end and we don’t currently have any support tickets where a similar issue is described. The code for IDEAL is the same across most of the local payment methods in the plugin so if it were a plugin issue it would be happening for more than just IDEAL. Is IDEAL the only local payment method you offer on your site?

    Kind Regards

    Thread Starter ttoaster

    (@ttoaster)

    Hi,

    As previously stated this is only happening with iDEAL, all other payment options are working as expected (single email per order, etc.)

    No, I don’t have multiple webhooks to this site, and no, I don’t use NGINX for my server, I use Apache.

    I have the following enabled (other than Credit card, Apple Pay and Browser Payments):

    Bancontact, Giropay, EPS, iDEAL, Przelewy24, Multibanco, Alipay and WeChat.

    This issue is not occurring with any of the others listed above, nor Credit Card, Apple Pay or Browser Payments.

    Regards,
    Martin

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ttoaster

    This issue is not occurring with any of the others listed above, nor Credit Card, Apple Pay or Browser Payments.

    Card payments, Apple Pay, and Browser Payments don’t rely on the webhooks so that’s not surprising. I would expect this to only affect local payment methods.

    Does this happen to all iDEAL payments or just a certain percentage? It sounds like what could be happening is the plugin is processing the redirect from the iDEAL payment page back to your store correctly but at the same time the payment_intent.succeeded webhook is being received.

    The plugin uses transients to place a lock on the order to prevent race conditions but it seems as if that’s behaving differently for you.

    Can you locate the WooCommerce > Status > Logs wc-stripe log file with a timestamp that has one of these orders? I’d like to see what story the log file tells.

    Kind Regards

    Thread Starter ttoaster

    (@ttoaster)

    Hi,

    No I do not have debug logging enabled (for privacy) so I do not have that data available, sorry.

    I have seen it with all iDEAL payments via your plugin, not just a few, all.

    I guess I’ll have to live with it then, and just field any questions from customers that may erroneously believe they have been charged twice for their order (or remove iDEAL as a payment option).

    Regards,
    Martin

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @ttoaster

    I guess I’ll have to live with it then, and just field any questions from customers that may erroneously believe they have been charged twice for their order (or remove iDEAL as a payment option).

    It would be my preference to help you get this issue solved if possible, it’s just hard without having all the information such as logging. But understand your point about privacy.

    We’ll continue to try and re-create this on our end and let you know via this thread if we discover anything.

    Kind Regards

    Thread Starter ttoaster

    (@ttoaster)

    An update for you:
    I have been watching all orders coming through and ALL orders using iDEAL are the only ones where duplicate emails are sent (both to me and to the customer).

    Plugin Author Payment Plugins

    (@mrclayton)

    @ttoaster do you have a staging site where more comprehensive testing using “test” mode can be performed and the duplicate email issue can be replicated?

    If you do have a staging site and prefer to keep the url private, you can create a support ticket here.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Duplicate Emails with iDEAL…’ is closed to new replies.