|
|
@@ -103,7 +103,7 @@ class WxOpenController extends PublicController
|
|
|
util::stop('没有获取到公众号帐号基本信息');
|
|
|
}
|
|
|
$authorize_info = $authorizeDetailInfo['authorizer_info'];
|
|
|
- $nick_name = $authorize_info['nick_name'];
|
|
|
+ //$nick_name = $authorize_info['nick_name'];
|
|
|
$head_img = $authorize_info['head_img'];
|
|
|
$service_type_info = $authorize_info['service_type_info'];
|
|
|
if ($service_type_info['id'] != 2) {
|
|
|
@@ -116,9 +116,7 @@ class WxOpenController extends PublicController
|
|
|
$user_name = $authorize_info['user_name'];
|
|
|
$alias = $authorize_info['alias'];
|
|
|
$qrCodeUrl = $authorize_info['qrcode_url'];
|
|
|
- $business_info = $authorize_info['business_info'];
|
|
|
- $open_pay = $business_info['open_pay'];
|
|
|
- $wxAccessTokenTime = date("Y-m-d H:i:s", (time() + $expires_in - 100));//安全起见,将过期时间设置得比微信里还短100秒
|
|
|
+ $accessTokenTime = date("Y-m-d H:i:s", (time() + $expires_in - 100));//安全起见,将过期时间设置得比微信里还短100秒
|
|
|
|
|
|
//开放平台还没有关联公众号,先将开放平台关联公众号
|
|
|
$open = WxOpenService::getOpen();
|
|
|
@@ -126,9 +124,9 @@ class WxOpenController extends PublicController
|
|
|
WxOpenService::updateById(1, ['merchantId' => $id]);
|
|
|
}
|
|
|
|
|
|
- $merchant = xhMerchantService::getByAppId($authorizeAppId);
|
|
|
- if (isset($merchant['id']) && $merchant['id'] != $id) {
|
|
|
- util::stop('授权的公众号不正确');
|
|
|
+ $merchant = MerchantService::getMerchantById($id);
|
|
|
+ if (!empty($merchant['wxAppId']) && $merchant['wxAppId'] != $authorizeAppId) {
|
|
|
+ util::stop('授权的公众号与商家不对应');
|
|
|
}
|
|
|
|
|
|
//小程序
|