Commit fa7847be authored by jianghaiming's avatar jianghaiming

update:Set

parent 4da4048d
...@@ -112,14 +112,19 @@ class UserService ...@@ -112,14 +112,19 @@ class UserService
$sessionKey = !empty($userInfo['session_key']) ? $userInfo['session_key'] : ''; $sessionKey = !empty($userInfo['session_key']) ? $userInfo['session_key'] : '';
$openid = isset($userInfo['openid']) && $userInfo['openid'] ? $userInfo['openid'] : ''; $openid = isset($userInfo['openid']) && $userInfo['openid'] ? $userInfo['openid'] : '';
if (empty($userInfo) || !$sessionKey || !$openid) { if (empty($userInfo) || !$sessionKey || !$openid) {
throw new UserException(['cus' => 5]); //throw new UserException(['cus' => 5]);
} }
//解密 //解密
$decryptData = []; $decryptData = [];
$wXBizDataCrypt = new WxBizDataCrypt($appid, $sessionKey); $wXBizDataCrypt = new WxBizDataCrypt($appid, $sessionKey);
$errCode = $wXBizDataCrypt->decryptData($encryptedData, $iv, $decryptData); $errCode = $wXBizDataCrypt->decryptData($encryptedData, $iv, $decryptData);
if ($errCode) { if ($errCode) {
throw new UserException(['cus' => 6]); throw new UserException(['cus' => 6]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment