PHP code example of morton / youshu

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

    

morton / youshu example snippets



orton\Youshu\Goods\SaleIds;
$data = [
    'merchId'=>'229832127808536577',
    'timestamp'=>date('Y-m-d H:i:s'),
    'nonceStr'=>uniqid(),
    'signId'=>'1449693080587509761',
    'pageCurrent'=>1,
    'pageSize'=>10
];
$privateKey = <<<EOD
-----BEGIN RSA PRIVATE KEY-----

-----END RSA PRIVATE KEY-----
EOD;
$publicKey = <<<EOD
-----BEGIN PUBLIC KEY-----

-----END PUBLIC KEY-----
EOD;
$objcet = new SaleIds($privateKey,$publicKey);
$reslut = $objcet->request($data);