Adding a prefix to SagePay Transaction numbers


https://forum.kartris.com/Topic3700.aspx
Print Topic | Close Window

By holtcomp - Sat 11 Apr 2015
I have a situation where several online shops share one sagepay account which works fine.

The existing websites were using cactushop and I inserted a bit of code to add a prefix to the sagepay transaction numbers so that

a) when looking at the list of transactions in the sagepay interface you could easily identify which website a transaction related to

and

b) it avoided the real possibility that duplicate transaction numbers could be generated from two different databases, i.e. order number 20 on website a would attempt to generate the same TX number as order number 20 on website b.

As I switch to Kartris I am trying to avoid inserting little bits of code so I wondered if there was a cleverer way of achieving this, or if it does involve a bit of code what would be the neatest coding solution.
By Paul - Tue 14 Apr 2015
Easiest way is to seed the SQL identity field on the tblKartrisOrders table. Normally order numbers start with 1, but you can change the seed value on the table to start at 1000000, 2000000, 3000000, etc.
By holtcomp - Tue 14 Apr 2015
Yes thanks, I meant to say is there any way other than setting the seed value.

That will work but I was hoping to be able to have the name of the site followed by a number but i guess it wouldn't be the end of the world.

cheers

mark