PHP code example of seek-x2y / hipac-sdk

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

    

seek-x2y / hipac-sdk example snippets


$config = [
  'common' => [
    'appKey' => '',
    'v' => '',
    'format' => '',
    'signMethod' => '',
    'partnerId' => '',
  ],
  'appSecret' => '',
  'url' => '',
  'sign' => '',
  'debug' => true,
];
$data   = '{
     "Orders": [
      {
       "orderNum": "YT201703295686382234c",
       "LogisticsInfoList": [
        {
         "logisticsName": "百世快递",
         "logisticsNo": "50393201809412",
         "logisticsCode": "shunfeng"
        },
        {
         "logisticsName": "百世快递",
         "logisticsNo": "50393201809413",
         "logisticsCode": "shunfeng"
        }
       ]
      }
     ]
}';

$data = json_decode($data, true);
$api = new Hipac($config);
$res = $api->delivery($data);