PHP code example of dwc / adapay

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

    

dwc / adapay example snippets




use dwc\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 dwc\adapay\SignTool\SignTool;

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