Download
Download the module: base-1.0.1.rar
Installation
1. Create the pay4bit_payments table in the database:
CREATE TABLE IF NOT EXISTS `pay4bit_payments` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`LocalPayId` varchar(255) NOT NULL,
`account` varchar(255) NOT NULL,
`sum` float NOT NULL,
`itemsCount` int(11) NOT NULL DEFAULT '1',
`dateCreate` datetime NOT NULL,
`dateComplete` datetime DEFAULT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;This table will be used to log information about the payments made.
2. Place the scripts in an arbitrary directory on the web server, ensuring that the directory is accessible from the internet.
Make sure the server has PHP version 5.x.x or higher installed and the mysqli extension is available for working with MySQL databases.
3. In config.php, specify the database connection parameters, the cost of one item, and the secret key (find it in the project settings in your merchant.pay4bit.net account).
If payments are used to top up a balance, leave the cost of one item set to 1.
4. In the merchant.pay4bit.net account's project settings, specify the webhook URL, which in this case is the absolute URL where index.php is accessible.