It works perfectly except for one thing.
Gaps are now appearing between order numbers....
I've narrowed the causes down to what happens on the checkout_payment.php and checkout_confirmation.php pages.
Upon visiting checkout_confirmation.php an order is being inserted into the DB (with the status of "Preparing [WorldPay]") prior to the customer pressing the confirm button to actually perform payment.
This isn't a problem unless the customer chooses to not confirm at that moment in time and continues shopping, browses away or logs out.
Upon returning to the checkout_confirmation.php (or passing through checkout_payment.php) the order that was previously created is sometimes removed from the DB and instead of reusing the ID it just cleaned up a new one is created instead (or so it seems) and this is what leads to the gaps appearing. I can supply a list of "lost" order numbers when it's time to do our accounts, but it looks suspect and I'd prefer a fix.
My thoughts are that if the insert is only done when the customer presses the confirm button we don't need to tidy up old incomplete orders (because there won't be any to clear up), but I don't know how/which code to move between the various functions within the includes/modules/payment/worldpay_junior.php file to achieve this. I've tried comparing/learning with other less complex modules but am getting nowhere fast.
Naturally I've asked worldpay for help as it only happens when using it, but they refuse on the basis that they didn't write the code and that it's happening prior to communicating with their services, so I'm a stuck unless I can fix it myself or decide to ditch them and use another gateway that's more cooperative. (like PayPal who couldn't do enough to help make PPEC work).
Has anyone else who's used this module come across the same problem, if so how did you resolve it?
Harold, if you're reading this, can I ask why you've made this module work in this way?
Edited by Teabag, 03 December 2008 - 18:45.