1. Go to this page and download the library: Download ledc/xhdpay 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 / xhdpay example snippets
use Ledc\XhdPay\Config;
use Ledc\XhdPay\XhdPay;
$env_config = [
'merchantNo' => '联合商户号',
'terminalNo' => '联合设备号',
'secretKey' => '密钥',
'enable' => '启用支付',
'debug' => '启用测试环境',
'notifyUrlPrefix' => '通知地址前缀,格式如:https://iyuu.cn/xhdpay/callback',
];
$config = new Config($env_config);
$api = new XhdPay($config);