Browse Source

XML请求数据xmlKey

master
wanghongjun 1 year ago
parent
commit
c54b2d0a7b
  1. 14
      app/service/webService/ChinaTaxes.php

14
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 = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SZQKLDZSPSB0001ZipBase64RequestBw
<SZQKLDZSPSB00'.$xmlKey.'ZipBase64RequestBw
xmlns:ns2="http://www.chinatax.gov.cn/dataspec/">';
$start1 = '<SZQKLDZSPSB0001ZipBase64RequestBw>';
$end = '</SZQKLDZSPSB0001ZipBase64RequestBw>';
$start1 = '<SZQKLDZSPSB00'.$xmlKey.'ZipBase64RequestBw>';
$end = '</SZQKLDZSPSB00'.$xmlKey.'ZipBase64RequestBw>';
$this->xmlKey = '01';
$xml = '';
$xml2 = '';
foreach ($body as $key => $value) {

Loading…
Cancel
Save