PHP code example of wxm / jd-sdk

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

    

wxm / jd-sdk example snippets


$jd = new \Jd\Application('app_key', 'secret_key');

// 例如 jd.union.open.goods.jingfen.query 其他接口同理
$jd->union->open->goods->jingfen->query();

    \Jd\ServiceProvider::class
    

    // 例如 jd.union.open.goods.jingfen.query 其他接口同理
    \Jd\Facades\Jd::union()->open->goods->jingfen->query();
    

    $app->register(\Jd\ServiceProvider::class);
    

    // 例如 jd.union.open.goods.jingfen.query 其他接口同理
    \Jd\Facades\Jd::union()->open->goods->jingfen->query();
    
shell
    php artisan vendor:publish --provider="\Jd\ServiceProvider" --force