I've worked through this solution and all is working well with database driven discount codes.
However, I have a problem in that I need to store the discount code in the database to apply this to the invoices.
My process is as follows:
Cart > Checkout > Confirm (stores data and summary) > payment gateway
I need the discount code to be accessible at the confirm stage to store the data, but if I try binding the relevant data to either a Form binding or a Session variable, both return blank values after the Cart page.
Any suggestions as to what I'm doing wrong as far as being able to retain or store the discount code value through the process to make it available on the Confirm page?