PHP code example of tinywan / antfin-php-sdk
1. Go to this page and download the library: Download tinywan/antfin-php-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/ */
tinywan / antfin-php-sdk example snippets
use AntCloudSDKCore\AntCloudClient;
// 初始化客户端
$client = new AntCloudClient(
"https://prodapigw.cloud.alipay.com/gateway.do",
"<your-access-key>",
"<your-access-secret>"
);
// 构建请求
$request = array(
"cert_id" => "0001",
"org_did" => "dimychain:66530b21a9bee783234c442b653e909136629a5a3075be7b4d9ae085782e3d36",
"method" => "baas.ebc.cert.query",
"version" => "1.0",
"product_instance_id" => "7304XXXXXXXX",
"region_name" => "CN-HANGZHOU-FINANCE",
);
// 发送调用请求,解析响应结果
$response = $client->execute($request);