My website runs ubercart-6.x-2.7 with uc_checkoutfi-6.x-1.1.
When paying an order, 2 identical confirmation emails are sent to the user and 2 to the administrator.

This looks like the same problem as #1332130: Duplicate emails when using 2Checkout.
I tested a fix similar to the patch written for this issue: if I move "uc_order_save($order)" before the call to "uc_payment_enter([...])" in function uc_checkoutfi_complete(), then the correct number of emails get sent. However I'm not familiar enough with the code to tell whether it's a correct fix.

Comments

Neo Mithrandil’s picture

This bug could really use some attention.

I'm also seeing race conditions when users click several times on "Return to seller's service" in the netbank, causing some orders to be left "in checkout" even though payment was received. The frequency of these failures goes down more than ten-fold if I remove the "uc_order_save($order)" call as described above.

operinko’s picture

Status: Active » Needs review
StatusFileSize
new1.08 KB

Tested the fix, seems to work as intended.
From what I could gather, the uc_order_comment_save manages to trigger the "New order" email.

demoshane’s picture

Can confirm this, clients get double emails after completing order.

operinko’s picture

Should be fixed in commit 547b51b on 6.x-1.x.

demoshane’s picture

Problem arises in D7 version aswell.

operinko’s picture

Fixed for 7.x-1.x in commit 69c48f2.

operinko’s picture

Neo Mithrandil’s picture

Thanks for the fix!
As mentioned in comment #1 some race conditions in payments may still exist after this, but I'll file a new bug if I can collect enough data about them.

Neo Mithrandil’s picture

Status: Needs review » Closed (fixed)

Closing this bug.