After success you redirect with drupal_goto('cart/checkout/complete') that calls uc_cart_checkout_complete(). This function calls uc_cart_complete_sale().

If you have http notify enabled the function uc_pnag_payment_notify() is called. This function calls uc_cart_complete_sale() again.

Because of this the trigger "Customer completes checkout" fires two times (= 2 Mails, 2 = stock decrement, etc.). Is there a reason why you are using uc_cart_checkout_complete() at the last point? I deleted it and I see no differences except fixing described problem.

I'm using current dev of ubercart.

Comments

checker’s picture

Title: the module calls uc_cart_complete_sale() withce with http notify enabled » the module calls uc_cart_complete_sale() twice - if http notify is enabled
jurgenhaas’s picture

Status: Active » Fixed

Thanks for reporting this, I've just fixed this and submitted a revised dev release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

pieterdc’s picture

@checker Thanks for the report.
@jurgenhaas Thanks for the commit.