X-Payments:Installation

From X-Payments Help
Jump to: navigation, search
X-Payments user manual
  1. X-Payments:General information
  2. What's New
  3. System requirements
  4. Installation
  5. Two-factor user authentication
  6. Configuring X-Payments
  7. Managing users
  8. Customizing the interface
  9. Managing payments
  10. Unistalling X-Payments
  11. Upgrading
  12. Moving X-Payments from one host to another
  13. Viewing X-Payments logs
  14. FAQ
  15. Troubleshooting
  16. Glossary
  17. Supported payment gateways
  18. Popular Payment Methods Configuration Instructions

Video tutorial

Procedure

1. Download the X-Payments distribution package x-payments-x.y.z.tgz from the File Area section of your X-Cart Account (x, y and x stand for the X-Payments version).

2. Decompress the archive to a web accessible directory on your server or your hosting account.

3. Make sure file permissions are adjusted correctly: X-Payments:Setting up file permissions for X-Payments

4. Create a copy of the file config.ini-dist.php with the name config.ini.php and open the file config.ini.php in a text editor.

5. In config.ini.php, set values for the following variables:

[mysql]
  • server="DNS name or IP address of your MySQL server" (for example, localhost or 127.0.0.1)
  • port="MySQL server port (optional)"
  • unix_socket="MySQL server socket (optional)" (for example, /tmp/mysql-5.0.51.sock)
  • dbname="MySQL database name"
  • user="MySQL server username"
  • password="MySQL server password"
[mail]
  • from="Email address for the field "From""
  • host="SMTP server, e.g. mail.localhost or ssl://yourmailserver.domain for TSL/SSL SMTP support"
  • port="SMTP port, e.g. 25"
  • user="SMTP username"
  • password="SMPT password"
  • auth="LOGIN/CRAM-MD5/DIGEST-MD5" (SMTP authentication must have one of the following values: LOGIN , CRAM-MD5, DIGEST-MD5)
  • timeout="10" (SMTP server timeout in seconds)
[location]
[proxy]
  • proxy="Proxy server to send http/https requests (used by cURL)"
Note: To avoid incorrect parsing of configuration data it is strongly recommended to enclose all passwords, paths and other data in double quotation marks. If the data itself contains double quotation marks or a backslash, put a backslash before them, like this: \" or \\

6. Make sure the file config.ini.php is not writable by web scripts.

7. Using a web browser, run the installation script install.php, e.g. https://www.example.com/xp/install.php, and follow the instructions on the screen.

Note: IMPORTANT: Once the installation is complete, you will receive an email notification at the email address that you specified during the installation. The notification includes a link to the email address validator. Click on the link, and you will be able to login to the X-Payments back-end.

8. IMPORTANT. Default codes contained in <lib/XPay/Model/Codebook.php> must be changed after the installation is done. Use maintenance script regen-codebook.php to generate a new codebook.

Running the cron.php script

X-Payments provides a script cron.php which must be executed from the command line. You can use this script to launch execution of periodic service tasks required for the correct operation of X-Payments. For example, this script removes cardholder data for orders that no longer need to be stored. It is recommended to launch this script using your favorite scheduling program (for example | cron daemon in Unix/Linux systems) once a day.

Recommended setup for running the cron.php script via crontab:

0 0 * * * cd /full/path/to/xpayments ; /path/to/php/bin -f /full/path/to/xpayments/cron.php

  • 0 0 * * * - to run the script every day
  • cd /full/path/to/xpayments - to change dir to X-Payments folder on your server
  • /path/to/php/bin - path to PHP 5.3 CLI binary on your server
  • -f - to execute /full/path/to/xpayments/cron.php script


Important: To run the script cron.php, you must use the command line interface. If the script is run not in the command line interface (for example, if you try to run it in your browser window), its execution will be interrupted for security reasons.