JuanIgnacio Posted January 23, 2007 Posted January 23, 2007 (edited) I'm doing a personalized payment module for a credit card gateway They ask me to send them my order number. I need this because the result of the transaction is stored in a control panel they provide, so then when I look at the orders in the admin panel, i have to llok for that order in their panel. I've seen that most of the modules generate a number with the date and time like this: tep_draw_hidden_field('ordernumber', $customer_id . '-' . date('Ymdhis')) But I need to send the real number the order will hae when I look at the orders in the admin section. I looked at the order.php class but I havent seen anthing like $order > info['id'];. All the parameters I could find were related to the customer or products but no order number. How can I generate the real order number? Edited January 23, 2007 by JuanIgnacio Quote
Guest Posted January 23, 2007 Posted January 23, 2007 Unfortunately there is no real way of doing this as the order id is not assigned until the order is stored in the db after payment is process. The closest way is to query the orders table to find the order number of the last order then increment it by 1 to predict the order number - this works most times. Tom Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.