微信小程序支付异常处理

feat/task1-c-wallet
devil_gong 2019-06-17 15:23:34 +08:00
parent a61bc22eeb
commit 56a845848d
2 changed files with 6 additions and 3 deletions

View File

@ -161,9 +161,12 @@ class Weixin
}
// 微信中打开
if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false && empty($params['user']['weixin_web_openid']))
if(in_array(APPLICATION_CLIENT_TYPE, ['pc', 'h5']))
{
exit(header('location:'.PluginsHomeUrl('weixinwebauthorization', 'pay', 'index', input())));
if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false && empty($params['user']['weixin_web_openid']))
{
exit(header('location:'.PluginsHomeUrl('weixinwebauthorization', 'pay', 'index', input())));
}
}
// 获取支付参数

View File

@ -60,7 +60,7 @@ App({
// 请求地址
request_url: "{{request_url}}",
//request_url: 'https://test.shopxo.net/',
request_url: 'https://test.shopxo.net/',
// 基础信息
application_title: "{{application_title}}",