PHP code example of bolechen / gongmall-php-sdk

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

    

bolechen / gongmall-php-sdk example snippets




$gongmall = new \Bolechen\Gongmall\Gongmall([
    'apiKey' => '',
    'apiSecret' => '',
    'contractUrl' => '', //电签网址

    'debug' => true, // 调试模式
    'sandbox' => true, //沙盒模式

    'log' => [
        'name' => 'gongmall',
        'file' => __DIR__.'/gongmall.log',
        'level'      => 'debug',
        'permission' => 0777,
    ]
]);

// 电签地址
$result = $gongmall->employee->getContractUrl(['name' => '张三', 'mobile' => 'xxx', 'idNumber' => 'xxx']);

// 查询电签结果
$result = $gongmall->employee->getContractStatus($array);

// 查询企业当前余额
$result = $gongmall->company->getBalance();