PHP code example of kangdev / sinanhui
1. Go to this page and download the library: Download kangdev/sinanhui library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kangdev / sinanhui example snippets
$config = [
'channel_no' => 'dc808c5e48454f43b',
'url' => 'https://luya.huidaojia.net',
];
$server = new \Kangdev\Sinanhui\Server($config);
// 同步增加or减少积分接口
$res = $server->action_integral([
'phone' => '15538586868',
'integral' => 500,
'datetime' => "2023-05-23 19:25:30",
'order_no' => "hdj168291".rand(10,1000),
]);
echo $res;
// 获取中台积分用户核销二维码
$server->getIntegralCode([
'phone' => '15538586868'
]);