快递订阅数据修改
快递订阅地址
This commit is contained in:
@@ -23,6 +23,8 @@ class Kuaidi
|
||||
#[Inject]
|
||||
protected Client $client;
|
||||
|
||||
protected string $domain_name;
|
||||
|
||||
/**
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
@@ -31,6 +33,14 @@ class Kuaidi
|
||||
{
|
||||
$this->container = ApplicationContext::getContainer();
|
||||
$this->client = $this->container->get(Client::class);
|
||||
|
||||
$app_env = config('app_env','dev');
|
||||
if ($app_env == "prod"){
|
||||
$this->domain_name = env('DOMAIN_NAME_PROD','https://prod.hospital.applets.igandanyiyuan.com/');
|
||||
}else{
|
||||
$this->domain_name = env('DOMAIN_NAME_DEV','https://dev.hospital.applets.igandanyiyuan.com/');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -57,7 +67,7 @@ class Kuaidi
|
||||
'number' => $logistics_no, // 快递单号
|
||||
'key' => config("kuaidi100.key"), // 客户授权key
|
||||
'parameters' => array (
|
||||
'callbackurl' => 'http://dev.hospital.applets.igandanyiyuan.com/callback/logistics', // 回调地址
|
||||
'callbackurl' => $this->domain_name . 'callback/logistics', // 回调地址
|
||||
'resultv2' => '1', // 行政区域解析
|
||||
'phone' => $phone ?: "", // 手机号
|
||||
'salt' => config('kuaidi100.salt'), // 签名用字符串
|
||||
|
||||
Reference in New Issue
Block a user