|
|
|
@ -26,6 +26,8 @@ class ChinaTaxes |
|
|
|
protected $invoiceIssuance; |
|
|
|
// 加密XML Base标签的key |
|
|
|
protected $xmlKey = '01'; |
|
|
|
// |
|
|
|
protected $xmlDataType = 0; |
|
|
|
|
|
|
|
/** |
|
|
|
* @throws FuncException |
|
|
|
@ -262,9 +264,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_DW_DZSCMXYC_QUERY', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -286,9 +286,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_PZ_QUERYDKDZJKP', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -316,9 +314,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_SFJYJK', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result, 0); |
|
|
|
return $this->resultXml($param, 0); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -356,9 +352,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_SB_XNHGZ', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -374,9 +368,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_DELETEWTDZ', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -393,11 +385,11 @@ class ChinaTaxes |
|
|
|
'skssqz' => $this->invoiceIssuance['skssqz'], // 税款所属期止,格式,年-月-日 |
|
|
|
]; |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_SB_CXDZMXSJHZ', $body); |
|
|
|
$this->xmlDataType = 1; |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_SB_CXDZMXSJHZ', $body); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -417,9 +409,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_SB_BCWTDZHZJK', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -439,9 +429,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_ZM_SAVEPLSQKJSSWSZMJK', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -459,9 +447,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_PZ_QUERYDZJKPZZFQK', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -485,9 +471,7 @@ class ChinaTaxes |
|
|
|
|
|
|
|
$param = $this->getParamData('SSGZ_GZPT_SZQKL_ZM_SAVEPLSQKJSSWSZMFORWXT', $body); |
|
|
|
|
|
|
|
$result = $this->json_curl(json_encode($param)); |
|
|
|
|
|
|
|
return $this->resultXml($result); |
|
|
|
return $this->resultXml($param); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -682,7 +666,12 @@ xmlns:ns2="http://www.chinatax.gov.cn/dataspec/">'; |
|
|
|
if ($node->hasChildNodes()) { |
|
|
|
foreach ($node->childNodes as $child) { |
|
|
|
if ($child->nodeType === XML_ELEMENT_NODE) { |
|
|
|
$output[$child->nodeName] = $this->xmlToArray($child); |
|
|
|
$data = $this->xmlToArray($child); |
|
|
|
if ($this->xmlDataType == 1 && is_array($data)) { |
|
|
|
$output[$child->nodeName][] = $data; |
|
|
|
} else { |
|
|
|
$output[$child->nodeName] = $data; |
|
|
|
} |
|
|
|
} elseif ($child->nodeType === XML_TEXT_NODE) { |
|
|
|
$output = $child->nodeValue; |
|
|
|
} |
|
|
|
|