From X-Cart 4 Classic
Jump to: navigation, search

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:

  1. Copy the file <lib/XPay/Model/Codebook.php> to the file <lib/XPay/Model/Codebook.prev.php>
  2. Create an X-Payments database dump.
  3. Run the script with a -run flag
    php regen-codebook.php -run <system path to X-Payments>
  4. 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.
  5. If the script completed successfully delete the database dump file and the <lib/XPay/Model/Codebook.prev.php> file.