callmez\wechat\sdk\components\BaseWechat::decryptXml PHP Method

decryptXml() public method

解密XML数据
public decryptXml ( string $xml, string $messageSignature, string $timestamp, string $nonce ) : string | boolean
$xml string 解密的XML
$messageSignature string 加密签名
$timestamp string 加密时间戳
$nonce string 加密随机串
return string | boolean
    public function decryptXml($xml, $messageSignature, $timestamp, $nonce)
    {
        $errorCode = $this->getMessageCrypt()->decryptMsg($messageSignature, $timestamp, $nonce, $xml, $xml);
        if ($errorCode) {
            $this->lastError = ['errcode' => $errorCode, 'errmsg' => 'XML数据解密失败!'];
            return false;
        }
        return $xml;
    }