The Authnet AIM module (and the Linkpoint module) has code in it to check the last order number, then add 1 and use that when submitting a new payment transaction. You can duplicate that code and adjust as needed, ideally in the same class method as you copy it from.
Remember: Zen Cart doesn't officially assign a final order number until *after* payment is confirmed ... so this process is only a best-guess approximation, primarily intended for use when reconciling between the payment gateway and the store.


Reply With Quote
