PHP code example of asialong / kwaixiaodian-sdk

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

    

asialong / kwaixiaodian-sdk example snippets




$dispatch = new \Asialong\KwaixiaodianSdk\Kwaixiaodian([
    'client_id' => 'your-app-key',
    'client_secret' => 'your-secret',
    'sign_secret' => 'your-signSecret',
    'debug' => true,
    'member_type' => 'MERCHANT',
    'redirect_uri' => 'http://www.xxx.com/callback',
    'log' => [
        'name' => 'kwaixiaodian',
        'file' => __DIR__ . '/kwaixiaodian.log',
        'level' => 'debug',
        'permission' => 0777,
    ],
]);