yc-hwc/laravel-thisshop

v1.0.2 2023-04-04 06:04 UTC

This package is auto-updated.

Last update: 2024-06-04 08:36:29 UTC


README

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);