payermax/sdk
Composer 安装命令:
composer require payermax/sdk
包简介
关键字:
README 文档
README
Evn prepare
composer install
Init Config
//构造参数 $merchantConfig = new MerchantConfig(); $merchantConfig->merchantNo = "your merchant no"; $merchantConfig->appId = "your merchantAppId"; $merchantConfig->merchantPrivateKey = "your private key"; $merchantConfig->payermaxPublicKey = "payermax public key"; //构造ISV商户所需参数 $merchantConfig->spMerchantNo = "xxx"; $merchantConfig->merchantAuthToken = "xxx"; //设置参数 PayermaxClient::setConfig($merchantConfig);
Send request
//构造业务报文 $requestData = '{"outTradeNo": "PAM20220109123456111617V3","subject": "hello","totalAmount": "0.99","currency": "USD","country": "HK","userId": "100000002","goodsDetails": [{"goodsId": "60","goodsName": "60鑽石","quantity": "1","price": "0.99","goodsCurrency": "USD","showUrl": "http://domaim.com"}],"language": "en","reference": "300011","frontCallbackUrl": "https://domai.url","notifyUrl": "https://domain.com"}'; $json_decodeData = json_decode($requestData, true); //请求并获取业务返回 $resp = PayermaxClient::send('orderAndPay', $json_decodeData); echo json_encode($resp) . "\n";
Verify Notification
PayermaxClient::verify("payermax request body", "payermax request sign");
统计信息
- 总下载量: 2.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2023-12-19