How to add a prefix to transaction ID?

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
thepurpleblob
Posts: 20
Joined: 22 Oct 2020, 15:39

How to add a prefix to transaction ID?

Post by thepurpleblob » 01 Nov 2020, 08:20

We use the same payment gateway for more than one system. It's therefore a requirement to add some sort of 'prefix' onto the 'invoice ID' to stop it clashing with other systems (and, of course, the payment provider requires them to be unique).

I'm struggling to find any simple way to do this.

User avatar
aimeos
Administrator
Posts: 7941
Joined: 01 Jan 1970, 00:00

Re: How to add a prefix to transaction ID?

Post by aimeos » 02 Nov 2020, 11:21

It's not that simple because the order domain isn't prepared for adding prefixes or using own IDs. Instead, it uses the autoincrement ID from the database. The easiest way at the moment is to set the autoincrement value to a high number so you will have different ID ranges for different services.

We've planned to improve the order domain in the 2021.x version, so it may be possible there.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply