Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice ID or order_id before confirmation.


Rwfresh

Recommended Posts

Hi All,

 

I am using authorize.net and have a unique problem. I need to generate some kind of unique sequential invoice/order_id to Auth.Net . The reason is we have a number of ways orders are being entered and need to track from where the orders came from. We do this with invoice numbers. The checkout_process.php does not generate an order_id until the transaction is approved. And so it should work like this. Except in my situation. Anyone know of a way without having to actually create DB records and delete them (if the transaction is not approved?) . I can't have orders generated/stored in the DB unless they are approved because the orders are imported into another DB. I've thought about creating another table that would store just one field: Invoice_id.. which could be used for this purpose. But anyone know of another way? i've also tried using the temp cart_id but it does not seem to show a value.. Thanks.

 

rw

Link to comment
Share on other sites

Does the number passed on to authorize.net need to be something useful? Else you could just pass it a unique random number and when the order has been placed it gets discarded and osCommerce writes it as the real order number.

Link to comment
Share on other sites

I considered that.. I guess it's the easiest thing to do. I would prefer it to be sequential and the actual order_id would even be better.. But i could just make it random and then pass that number back to the order record as well. Thanks.

 

rw

Link to comment
Share on other sites

Why not use the datestamp as your number? You could add a small random number to it, in case things get so busy that you have several orders on the same second. This number will always be sequential.

Link to comment
Share on other sites

  • 6 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...