Extracting next available order number from a payment module.
Posted: Mon Apr 05, 2021 6:57 pm
Hello,
My current payment module sends a time-stamp in UTC + 3 random numbers as a transaction ID to the payment processor as the order number is not set until payment has been completed successfully..
The accountant is complaining it's hard the match the Trans-ID to order numbers.
I was thinking to send the next available order number + 3 random numbers as the Trans-ID.
This will be wrong (one or two out on the order number) if several people are completing at once but not far out.
Any ideas how can I extract the next available order number from inside a payment module?
My current payment module sends a time-stamp in UTC + 3 random numbers as a transaction ID to the payment processor as the order number is not set until payment has been completed successfully..
The accountant is complaining it's hard the match the Trans-ID to order numbers.
I was thinking to send the next available order number + 3 random numbers as the Trans-ID.
This will be wrong (one or two out on the order number) if several people are completing at once but not far out.
Any ideas how can I extract the next available order number from inside a payment module?