PHP code example of ledc / pospal
1. Go to this page and download the library: Download ledc/pospal 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/ */
ledc / pospal example snippets
use Ledc\Pospal\Certificate;
use Ledc\Pospal\CustomerApi;
$config = [
'appId' => '银豹appId',
'appKey' => '银豹appKey',
'urlPrefix' => '银豹接口地址前缀',
];
$certificate = new Certificate($config);
$customerApi = new CustomerApi($certificate);
//添加会员
$customerApi->add();
//根据会员号查询会员
$customerApi->queryByNumber();
//根据会员手机号查询会员
$customerApi->queryByTel();
//根据会员在银豹系统的唯一标识查询
$customerApi->queryByUid();
//修改会员密码
$customerApi->updatePassword();
//修改会员余额积分
$customerApi->updateBalancePointByUid();