Demo.php
513 字节
<?php
include_once "wxBizDataCrypt.php";
class Demo
{
public function vi()
{
$appid = 'wx55afbe753b153a68';
$sessionKey = $_REQUEST['session_key'];
$encryptedData = $_REQUEST['encryptedData'];
$iv = $_REQUEST['iv'];
$pc = new WXBizDataCrypt($appid, $sessionKey);
$errCode = $pc->decryptData($encryptedData, $iv, $data);
if ($errCode == 0) {
print($data . "\n");
} else {
print($errCode . "\n");
}
}
}