PHP code example of leolei / payment

1. Go to this page and download the library: Download leolei/payment 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/ */

    

leolei / payment example snippets




return [
    'unionpay' =>[
        'merchant_id'=>'',//商户号
        'cer_pwd'=>'',//私钥密码
        'cer_path'=>'',//私钥路径
        'cer_dir'=>'',//公钥路径
        'sanbox'=>0//测试模式 0 关闭 1 开启
    ]
    'allinpay' =>[
        'mer_id'=>'',//商户号
        'sign'=>'',//私钥密码
        'sanbox'=>0//测试模式 0 关闭 1 开启
    ]
];