Kartris User Guide Further setup

On most payment systems, the gateway vendor will create a new account/installation for each of your sites. However one of the attractions of GP Webpay for admins with many sites is that they can all run through a single account. One issue that results from this is regarding the uniqueness of order IDs.

Typically Kartris allocates order IDs as numbers, sequentially as orders go into the tblKartrisOrders table (which happens before orders are paid, hence actual paid order numbers might have gaps between them where orders allocated some IDs don't end up paid and finished). If you run multiple sites, these will all start numbering from 1, hence you'll have multiple sites creating IDs which might be duplicates. This will be an issue when these orders are sent to GP Webpay, as it requires all orders have a unique ID. If another of your sites previously used the same ID, GP Webpay will reject it.

The fix is relatively simple. You should adjust the 'seed' value on the O_ID field of the tblKartrisOrders table (don't from within SQL Server Management Studio), so instead of being '1' (starting numbering at 1), it is some higher value. For example, if you had three web sites, you could start one at '1' another at '1000000' and another at '2000000'. Put the numbers far enough apart that each is never likely to reach where the next starts numbering, and you should avoid your sites ever issuing the same order IDs as each other.
powered by tomehost