This script will re-create the codebook contained in the <lib/XPay/Model/Codebook.php> script.
It will also change:
- the PIN-codes table,
- cardholder data encryption keys,
- online store keys,
- the 'force to change password' flag for all user accounts (including the Administrator).
since this information is encrypted using the codebook.
To avoid losing data, do the following before running the script:
- Copy the file <lib/XPay/Model/Codebook.php> to the file <lib/XPay/Model/Codebook.prev.php>
- Create an X-Payments database dump.
- Run the script with a -run flag
php regen-codebook.php -run <system path to X-Payments>
- If the script failed, copy the file <lib/XPay/Model/Codebook.prev.php> to the file <lib/XPay/Model/Codebook.php>, restore the database from the saved dump and repeat step 3.
- If the script completed successfully delete the database dump file and the <lib/XPay/Model/Codebook.prev.php> file.