PHP code example of guodont / transrush-sdk

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

    

guodont / transrush-sdk example snippets



$transRush = new \TransRush\TransRush([
    'Token' => 'YOUR-TOKEN', // Please use your Token .
    'Env' => 'DEV', // Or PRO
    'Key' => 'YOUR-KEY',
]);

// 创建预报单
$transRush->preAlertService->createPreAlert(CreatePreAlert $createPreAlert, Array $params = array());

// 删除预报单
$transRush->preAlertService->deletePreAlert(DeletePreAlert $deletePreAlert, Array $params = array());

// 查询仓库地址
$transRush->wareHouseService->getWareHouse();

// 验证webhook通知是否合法
$transRush->transRushWebHookUtil->isValidWebHook(array $body);