PHP code example of wangshukai / dq-sdk

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

    

wangshukai / dq-sdk example snippets



#使用分配的key和appSecret 网关地址填写测试或者线上地址  示例:https://xxx-api-test.xxx.cn 参数相关请参考冬青接口说明
$config = ['appKey' => 'XX', 'appSecret' => 'XX', 'gatewayUrl' => "XX"];
$dQSdk = new DqSdk($config);
$user = $dQSdk->user;//用户相关
$order = $dQSdk->order;//订单相关
$address = $dQSdk->address;//用户地址相关
$card = $dQSdk->card;//卡相关
$item = $dQSdk->item;//线下门店相关
$data = [
    'mobile' => '18X0XXXXXXX',
];
$res=$user->getUserInfoByMobile($data);//查询用户信息
$res=$item->allStore(['current'=>1,'size'=>10,'updateTime_ge'=>1637747886149]);//查询用户信息