PHP code example of monsteryuan / adapay_sdk

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

    

monsteryuan / adapay_sdk example snippets




use cccdl\adapay\Settle\SettleAccount;
//请求数组
$params = [
    'app_id' => 'app_id',
    'member_id' => 0,
];
//配置数组
$config = [

];
$adapayConfig = new AdapayConfig($config);
$service = new SettleAccount($adapayConfig);
$res = $service->balance($params);
//结果
var_dump($res);



use cccdl\adapay\SignTool\SignTool;

$adapayConfig = new AdapayConfig($config);
$service = new SignTool($adapayConfig);
$res = $service->checkSign();
//结果 true=验签成功,false=验签失败
var_dump($res);