Commit 900809fa authored by jianghaiming's avatar jianghaiming

update:St

parent 8be9f23b
......@@ -107,7 +107,8 @@ class UserService
$sessionKey = !empty($userInfo['session_key']) ? $userInfo['session_key'] : '';
$openid = isset($userInfo['wechat_openid']) && $userInfo['wechat_openid'] ? $userInfo['wechat_openid'] : '';
$openid = isset($userInfo['openid']) && $userInfo['openid'] ? $userInfo['openid'] : '';
if (empty($userInfo) || !$sessionKey || !$openid) {
throw new UserException(['cus' => 5]);
}
......@@ -116,6 +117,7 @@ class UserService
$decryptData = [];
$wXBizDataCrypt = new WxBizDataCrypt($appid, $sessionKey);
$errCode = $wXBizDataCrypt->decryptData($encryptedData, $iv, $decryptData);
if ($errCode) {
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