|
|
@ -21,7 +21,7 @@ class ChinaTaxes |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$this->apiUrl = env('taxes.api_url'); |
|
|
$this->apiUrl = env('taxes.api_url'); |
|
|
$this->reqId = env('taxes.req_id'); // 接入端交易请求唯一标识,长度 32 位,5 秒内不得重复,否则抛出异常:交易请求唯一标识重复。 |
|
|
$this->reqId = md5(time());//env('taxes.req_id'); // 接入端交易请求唯一标识,长度 32 位,5 秒内不得重复,否则抛出异常:交易请求唯一标识重复。 |
|
|
$this->channelId = env('taxes.channel_id'); // 接入渠道标识(ID) |
|
|
$this->channelId = env('taxes.channel_id'); // 接入渠道标识(ID) |
|
|
$this->channelSecret = env('taxes.channel_secret'); // 平台为接入渠道统一分配的密码,只有身份验证接口需要 |
|
|
$this->channelSecret = env('taxes.channel_secret'); // 平台为接入渠道统一分配的密码,只有身份验证接口需要 |
|
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ class ChinaTaxes |
|
|
'channelSecret' => $this->channelSecret, // 平台为接入渠道统一分配的密码,只有身份验证接口需要 |
|
|
'channelSecret' => $this->channelSecret, // 平台为接入渠道统一分配的密码,只有身份验证接口需要 |
|
|
'timestamp' => time(), // unix 时间戳 |
|
|
'timestamp' => time(), // unix 时间戳 |
|
|
'data' => [ |
|
|
'data' => [ |
|
|
'flag' => '499' |
|
|
'flag' => '大工业区生活垃圾处理费征收及开票需要' |
|
|
] // 身份验证数据,默认为空 |
|
|
] // 身份验证数据,默认为空 |
|
|
]; |
|
|
]; |
|
|
|
|
|
|
|
|
@ -69,14 +69,15 @@ class ChinaTaxes |
|
|
protected function getParamData($sid, $body): array |
|
|
protected function getParamData($sid, $body): array |
|
|
{ |
|
|
{ |
|
|
return [ |
|
|
return [ |
|
|
'reqId' => $this->reqId, |
|
|
'reqId' => md5(time() . rand(0,9)), |
|
|
'sid' => $sid, |
|
|
'sid' => $sid, |
|
|
'channelId' => $this->channelId, |
|
|
'channelId' => $this->channelId, |
|
|
'accessToken' => $this->accessToken, |
|
|
'accessToken' => $this->accessToken, |
|
|
'timestamp' => time(), |
|
|
'timestamp' => time(), |
|
|
'data' => [ |
|
|
'data' => [ |
|
|
'bizXml' => $this->bizXml($body) |
|
|
'flag' => '大工业区生活垃圾处理费征收及开票需要' |
|
|
] |
|
|
], |
|
|
|
|
|
'bizXml' => $this->bizXml($body) |
|
|
]; |
|
|
]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -106,7 +107,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_WTDZDRJK', $body); |
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_WTDZDRJK', $body); |
|
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
return $this->json_curl(json_encode($param)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|