yoka/lianlianpay-local

PHP 连连支付 SDK。

1.4 2021-12-16 08:27 UTC

This package is auto-updated.

Last update: 2024-09-16 14:55:11 UTC


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)

接口参数具体值请查看相关文档地址

接口中涉及字段timestampoid_partner统一不要传,oid_partner采用实例化config中配置参数,timestamp采用服务器当前时间