pavlinter / PrizmShopScript

How to integrate PRIZM to website or shop (PRIZM Servlet API)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PRIZM SHOP SCRIPT (PRIZM Servlet)

Download library phpqrcode

Put library to libs folder.
The path should be /libs/phpqrcode/qrlib.php

Import database

CREATE TABLE IF NOT EXISTS `pzm_history` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tr_id` varchar(255) NOT NULL,
  `address` varchar(26) NOT NULL,
  `price` decimal(16,2) NOT NULL,
  `comment` varchar(255) NOT NULL,
  `tr_timestamp` int(11) NOT NULL,
  `tr_date` timestamp NULL DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `pzm_order` (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `hash` char(32) NOT NULL,
  `price` decimal(7,2) NOT NULL,
  `currency_rate` float NOT NULL,
  `type` tinyint(1) NOT NULL COMMENT 'type of service/item',
  `status` tinyint(1) NOT NULL,
  `data` text,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

Noda settings (prizm.default.properties)

Screen Shot

Servlet settings (PrizmAPIServlet.properties)

Screen Shot

Run Noda (linux)

cd /root/prizm-dist/
sh run.sh

Run Servlet (linux)

cd /root/prizm-api/
sh run-servlet.sh

Set Cron Job

wget "https://domain.com/cron.php" 2>&1

About

How to integrate PRIZM to website or shop (PRIZM Servlet API)

License:MIT License


Languages

Language:PHP 95.7%Language:CSS 2.6%Language:JavaScript 1.7%