When we do a payment through ogone, the underlying order is processed twice. This means, that the purchasing receipt from the drupal site is sent out twice (at the same time) as well as the stock being reduced twice or three times in a row (see attached screenshot).

Comments

pistol’s picture

Addition: the stock is sometimes reduced 2 or 3 times, the orderreceipt is always sent out twice.

I does not depend whether i am logged in or not prior to my purchase

drumm’s picture

Status: Needs work » Active
drumm’s picture

Version: 6.x-1.8 » 6.x-1.x-dev
Assigned: Unassigned » drumm
Status: Active » Needs review

The attached patch simplifies the order completion process so it is faster and has less chances to work incorrectly. Building on #954290: Save Pay ID for future payment reference., it does know about duplicates. However, it does not completely solve the problem due to a general bug in Ubercart, #644538: Duplicate order notification e-mail, and duplicate stock decrement.

drumm’s picture

StatusFileSize
new10.05 KB
drumm’s picture

Status: Needs review » Fixed

Committed.

spoit’s picture

Moving the redirect to ''cart/checkout/complete" from uc_ogone_ok to uc_ogone_return_ok emptied our $_SESSION variables for anonymous users after payment completion.

Before redirecting the $_SESSION['do_complete'] was set, but after the redirect it was gone. Shifting this redirect back to the uc_ogone_ok callback made things working again.

While, as I see it, the uc_ogone_ok and uc_ogone_false functions are indeed obsolete, there seems to be a reason why it was made this way.

Status: Fixed » Closed (fixed)

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