Browse Source

调试

undefined
v-Brocloni 4 years ago
parent
commit
b134ea2d3a
2 changed files with 11 additions and 4 deletions
  1. +10
    -4
      addons/epay/library/Service.php
  2. +1
    -0
      addons/unishop/controller/Pay.php

+ 10
- 4
addons/epay/library/Service.php View File

@@ -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支付,直接返回字符串


+ 1
- 0
addons/unishop/controller/Pay.php View File

@@ -104,6 +104,7 @@ class Pay extends Base
'type' => "wechat",
'title' => $body,
'notifyurl' => Config::getByName('notify_url')['value'],
'returnurl' => Config::getByName('ali_return_url')['value'],
'trade_type' => $trade_type,

];


Loading…
Cancel
Save