Skip to content

Commit

Permalink
Merge pull request #2 from icowan/master
Browse files Browse the repository at this point in the history
增加华磊对接
  • Loading branch information
forecho authored Apr 9, 2020
2 parents 38d42a3 + a7ba325 commit bc79dfa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
use yiier\crossBorderExpress\contracts\Transport;
use yiier\crossBorderExpress\exceptions\ExpressException;

class ZhongShangPlatform extends Platform
class HuaLeiPlatform extends Platform
{
/**
* default host
*/
const HOST = 'http://119.3.151.226:8082';
const HOST = 'http://www.sz56t.com:8082';

const SUCCESS = "TRUE";

Expand Down
2 changes: 1 addition & 1 deletion src/platforms/PlatformsName.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ class PlatformsName
const EQUICK_PLATFORM = 'equick';
const FEITE_PLATFORM = 'feite';
const ETOWER_PLATFORM = "etower";
const ZHONGSHANG_PLATFORM = "zhongshang";
const HUALEI_PLATFORM = "hualei";
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,22 @@
use yiier\crossBorderExpress\contracts\Recipient;
use yiier\crossBorderExpress\contracts\Shipper;
use yiier\crossBorderExpress\Express;
use yiier\crossBorderExpress\platforms\ZhongShangPlatform;
use yiier\crossBorderExpress\platforms\HuaLeiPlatform;
use PHPUnit\Framework\TestCase;
use yiier\crossBorderExpress\platforms\PlatformsName;

class ZhongShangPlatformTest extends TestCase
class HuaLeiPlatformTest extends TestCase
{
private $config = [
"timeout" => 60.0,
"platforms" => [
PlatformsName::ZHONGSHANG_PLATFORM => [
// "host" => "http://118.25.228.118:8082",
// "print_host" => "http://118.25.228.118:8089",
PlatformsName::HUALEI_PLATFORM => [
"host" => "http://www.sz56t.com:8082",
"print_host" => "http://www.sz56t.com:8089",
// "username" => "TEST",
// "password" => "123456",
"username" => "KLXX",
"password" => '123456',
"customer_id" => "16481",
"customer_user_id" => "12941"
"username" => "",
"password" => "",
"customer_id" => "", // 如果有这customer_id和customer_user_id ,可以不填username,password
"customer_user_id" => ""
]
]
];
Expand Down Expand Up @@ -99,7 +96,7 @@ public function testCreateOrder()
$shipper->phone = '17091022322';
$expressOrder->shipper = $shipper;

$express = new Express($this->config, PlatformsName::ZHONGSHANG_PLATFORM);
$express = new Express($this->config, PlatformsName::HUALEI_PLATFORM);
try {
/** @var OrderResult $orderResult */
$orderResult = $express->createOrder($expressOrder);
Expand Down Expand Up @@ -134,7 +131,7 @@ public function testGetTransportsByCountryCode()
public function testGetPrintUrl()
{
$orderNumber = "881168"; // 订单号
$express = new Express($this->config, PlatformsName::ZHONGSHANG_PLATFORM);
$express = new Express($this->config, PlatformsName::HUALEI_PLATFORM);
$res = $express->getPrintUrl($orderNumber);
echo $res;
$this->assertNotNull($res);
Expand Down

0 comments on commit bc79dfa

Please sign in to comment.