PHP code example of thinksvip / aliexpress-sdk

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

    

thinksvip / aliexpress-sdk example snippets





use Aliexpress\AliexpressClient;
use Aliexpress\API\Request\Order\AeopTpSingleOrderQuery;
use Aliexpress\API\Request\Order\AliexpressTradeNewRedefiningFindorderbyidRequest;

    // 获取授权信息
    $api = new AliexpressClient('appKey','$secretKey','proxy','proxyPort');

    // 组装请求订单详情数据
    $req = new AliexpressTradeNewRedefiningFindorderbyidRequest();
    $param1 = new AeopTpSingleOrderQuery();
    $param1->order_id = 'xxxxxxxxxxxxx';
    $req->setParam1(json_encode($param1));
    $resp = $c->execute($req, 'accessToken');

    return $req->response($resp);