|
@@ 805-818 (lines=14) @@
|
| 802 |
|
|
| 803 |
|
} |
| 804 |
|
|
| 805 |
|
function parserJSONSource($responseContent, $nodeName, $nodeIndex) { |
| 806 |
|
$signDataStartIndex = $nodeIndex + strlen($nodeName) + 2; |
| 807 |
|
$signIndex = strpos($responseContent, "\"" . $this->SIGN_NODE_NAME . "\""); |
| 808 |
|
// 签名前-逗号 |
| 809 |
|
$signDataEndIndex = $signIndex - 1; |
| 810 |
|
$indexLen = $signDataEndIndex - $signDataStartIndex; |
| 811 |
|
if ($indexLen < 0) { |
| 812 |
|
|
| 813 |
|
return null; |
| 814 |
|
} |
| 815 |
|
|
| 816 |
|
return substr($responseContent, $signDataStartIndex, $indexLen); |
| 817 |
|
|
| 818 |
|
} |
| 819 |
|
|
| 820 |
|
function parserJSONSign($responseJSon) { |
| 821 |
|
|
|
@@ 866-881 (lines=16) @@
|
| 863 |
|
|
| 864 |
|
} |
| 865 |
|
|
| 866 |
|
function parserXMLSource($responseContent, $nodeName, $nodeIndex) { |
| 867 |
|
$signDataStartIndex = $nodeIndex + strlen($nodeName) + 1; |
| 868 |
|
$signIndex = strpos($responseContent, "<" . $this->SIGN_NODE_NAME . ">"); |
| 869 |
|
// 签名前-逗号 |
| 870 |
|
$signDataEndIndex = $signIndex - 1; |
| 871 |
|
$indexLen = $signDataEndIndex - $signDataStartIndex + 1; |
| 872 |
|
|
| 873 |
|
if ($indexLen < 0) { |
| 874 |
|
return null; |
| 875 |
|
} |
| 876 |
|
|
| 877 |
|
|
| 878 |
|
return substr($responseContent, $signDataStartIndex, $indexLen); |
| 879 |
|
|
| 880 |
|
|
| 881 |
|
} |
| 882 |
|
|
| 883 |
|
function parserXMLSign($responseContent) { |
| 884 |
|
$signNodeName = "<" . $this->SIGN_NODE_NAME . ">"; |