|
|
@@ -96,8 +96,11 @@ class Service |
|
|
|
Session::delete("openid"); |
|
|
|
Session::set("wechatorderdata", $params); |
|
|
|
$url = addon_url('epay/api/wechat', [], true, true); |
|
|
|
header("location:{$url}"); |
|
|
|
exit; |
|
|
|
$result = [ |
|
|
|
"trade_type"=>"MWEB", |
|
|
|
"mweb_url"=>$url |
|
|
|
]; |
|
|
|
return json_encode($result); |
|
|
|
} elseif ($request->isMobile()) { |
|
|
|
$method = 'wap'; |
|
|
|
} |
|
|
@@ -126,8 +129,11 @@ class Service |
|
|
|
//手机网页支付,跳转 |
|
|
|
$params['spbill_create_ip'] = $request->ip(0, false); |
|
|
|
$html = $pay->driver($type)->gateway('wap')->pay($params); |
|
|
|
header("location:{$html}"); |
|
|
|
exit; |
|
|
|
$result = [ |
|
|
|
"trade_type"=>"MWEB", |
|
|
|
"mweb_url"=>$html |
|
|
|
]; |
|
|
|
return json_encode($result); |
|
|
|
break; |
|
|
|
case 'app': |
|
|
|
//APP支付,直接返回字符串 |
|
|
|