Looking to hire Laravel developers? Try LaraJobs

laravel-thisshop maintained by yc-hwc

Description
PHP Thisshop SDK
Author
Last update
2023/04/04 08:04 (dev-main)
License
Links
Downloads
11

Comments
comments powered by Disqus

laravel-thisshop

thisshop SDK

安装教程

composer require yc-hwc/laravel-thisshop

用法


配置

    $config = [
       'thisshopkUrl' => '',
       'appId'        => '',
       'appSecret'    => '',
       'signSecret'   => '',
       'token'        => '',
    ];

    $thisshopSDK = \PHPThisshop\ThisshopSDK::config($config);

token获取

    $config = [
        'thisshopkUrl' => '',
        'appId'        => '',
        'appSecret'    => '',
    ];

    $thisshopSDK = \PHPThisshop\ThisshopSDK::config($config);
    $response = $thisshopSDK->accessToken()->post();
    print_r($response);

token校验

    $config = [
        'thisshopkUrl' => '',
        'appId'        => '',
        'appSecret'    => '',
        'token'        => ''
    ];

    $thisshopSDK = \PHPThisshop\ThisshopSDK::config($config);
    $response = $thisshopSDK->tokenCheck()->post();
    print_r($response);

订单列表Order list

    $config = [
        'thisshopkUrl' => '',
        'appId'        => '',
        'signSecret'   => '',
        'token'        => '',
    ];

    $thisshopSDK = \PHPThisshop\ThisshopSDK::config($config);
    $response = $thisshopSDK->business()
        ->withMethod('thisshop.order.list.get')
        ->withData([
            'orderStatus' => 0,
        ])
        ->post();
    print_r($response);