yoka / lianlianpay-local
PHP 连连支付 SDK。
1.4
2021-12-16 08:27 UTC
Requires
- php: >=7.0
- ext-json: *
- ext-mbstring: *
- ext-openssl: *
- doctrine/cache: 1.10.*
- guzzlehttp/guzzle: ~6.5
- monolog/monolog: ^1.22 || ^2.0
- pimple/pimple: ^3.0
- symfony/http-foundation: ^4.0
- symfony/psr-http-message-bridge: ^0.3 || ^1.0 || ^2.0
README
[目录]
如何使用
安装:
$ composer require yoka/lianlianpay:dev-master
使用:
$config = [ 'debug' => true, // 开启调试 'oid_partner' => '2020042200284052', // 商户号 'private_key' => file_get_contents('merchant_rsa_private_key.pem'), // 商户私钥 地址自行配置,绝对路径 'public_key' => file_get_contents('merchant_rsa_public_key.pem'), // 商户公钥 'll_public_key' => file_get_contents('llpay_public_key.pem'), // 连连支付公钥 'production' => env('APP_ENV') == 'pro', // 是否生产环境 根据.env文件值判断 // 日志 'log' => [ 'level' => 'debug', 'permission' => 0777, 'file' => storage_path('logs/lianlianpay-' . date('Y-m-d') . '.log'), // 日志文件, 你可以自定义 ], ]; $llp = new \Yoka\LianLianPay\LianLianPay($config); $result = $llp->account->phoneVerifyCodeApply('s1', '13250840721'); // 绑定手机验证码申请
SDK
调用示例: $llp->account->phoneVerifyCodeApply($userId, $regPhone, $timestamp = null)
接口参数具体值请查看相关文档地址
接口中涉及字段timestamp
、oid_partner
统一不要传,oid_partner
采用实例化config中配置参数,timestamp
采用服务器当前时间