PHP code example of overtrue / youzan

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

    

overtrue / youzan example snippets



use Overtrue\Youzan\Client;

$clientId = '0a24a9a466xxxxxxx';
$clientSecret = 'eeb65cce4e1adf251306dxxxxxxxx';
$storeId = 40050388;

$client = new Client($clientId, $clientSecret, $storeId);

$response = $client->get('youzan.pay.qrcodes.get', ['page_size' => 1, 'page_no' => 1]);

// or 

$response = $client->post('youzan.pay.xxxx.xxx', ['xxx' => 'xxx']);