diff --git a/app/service/webService/ChinaTaxes.php b/app/service/webService/ChinaTaxes.php index 1de1446..58dbb79 100644 --- a/app/service/webService/ChinaTaxes.php +++ b/app/service/webService/ChinaTaxes.php @@ -28,6 +28,8 @@ class ChinaTaxes protected $xml = 1; // 申请发票信息 protected $invoiceIssuance; + // 加密XML名 + protected $xmlKey = '01'; /** * @throws FuncException @@ -313,6 +315,7 @@ class ChinaTaxes ]; $this->xmlType = 2; + $this->xmlKey = '07'; $param = $this->getParamData('SSGZ_GZPT_SZQKL_SFJYJK', $body); @@ -352,6 +355,7 @@ class ChinaTaxes ]; $this->xmlType = 2; + $this->xmlKey = '10'; $param = $this->getParamData('SSGZ_GZPT_SZQKL_SB_XNHGZ', $body); @@ -515,11 +519,15 @@ class ChinaTaxes */ protected function bizXml($body, int $type = 0): string { + $xmlKey = $this->xmlKey; $start = ' -'; - $start1 = ''; - $end = ''; + $start1 = ''; + $end = ''; + + $this->xmlKey = '01'; + $xml = ''; $xml2 = ''; foreach ($body as $key => $value) {