|
@@ -167,7 +167,7 @@ class OrderController extends HomeBaseController |
|
@@ -167,7 +167,7 @@ class OrderController extends HomeBaseController |
167
|
$this->success('微信支付', url('user/Center/orderDetail', ['oid' => $oid]), $this->wxPay($info));
|
167
|
$this->success('微信支付', url('user/Center/orderDetail', ['oid' => $oid]), $this->wxPay($info));
|
168
|
} //支付宝支付
|
168
|
} //支付宝支付
|
169
|
elseif ($data['payment'] == 2) {
|
169
|
elseif ($data['payment'] == 2) {
|
170
|
- echo json_encode(['msg'=>'支付宝', 'url'=>url('order/Order/alipay',['oid'=>$oid]), 'code'=>20000]);
|
170
|
+ echo json_encode(['msg'=>'支付宝', 'url'=>url('order/Order/temp',['oid'=>$oid]), 'code'=>20000]);
|
171
|
exit();
|
171
|
exit();
|
172
|
} //余额支付
|
172
|
} //余额支付
|
173
|
elseif ($data['payment'] == 0) {
|
173
|
elseif ($data['payment'] == 0) {
|
|
@@ -357,15 +357,29 @@ class OrderController extends HomeBaseController |
|
@@ -357,15 +357,29 @@ class OrderController extends HomeBaseController |
357
|
}
|
357
|
}
|
358
|
}
|
358
|
}
|
359
|
|
359
|
|
|
|
360
|
+ //微信支付宝中转页面
|
|
|
361
|
+ public function temp() {
|
|
|
362
|
+ if(cmf_is_wechat()) {
|
|
|
363
|
+ echo '点击右上角,使用浏览器打开';
|
|
|
364
|
+ }else {
|
|
|
365
|
+ $this->alipay(1);
|
|
|
366
|
+ }
|
|
|
367
|
+
|
|
|
368
|
+ }
|
|
|
369
|
+
|
360
|
//欢迎支付宝支付
|
370
|
//欢迎支付宝支付
|
361
|
- private function alipay($out_trade_no, $subject, $total_amount, $body)
|
371
|
+ private function alipay($oid)
|
362
|
{
|
372
|
{
|
363
|
- if(1 == 1) {
|
373
|
+ if(!cmf_is_wechat()) {
|
364
|
header("Content-type: text/html; charset=utf-8");
|
374
|
header("Content-type: text/html; charset=utf-8");
|
365
|
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
|
375
|
require_once EXTEND_PATH . '/alipay/wappay/service/AlipayTradeService.php';
|
366
|
require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
|
376
|
require_once EXTEND_PATH . '/alipay/wappay/buildermodel/AlipayTradeWapPayContentBuilder.php';
|
367
|
require EXTEND_PATH . '/alipay/config.php';
|
377
|
require EXTEND_PATH . '/alipay/config.php';
|
368
|
|
378
|
|
|
|
379
|
+ $out_trade_no = '2018101210215';
|
|
|
380
|
+ $subject = '购买';
|
|
|
381
|
+ $total_amount = 0.01;
|
|
|
382
|
+ $body = '商品';
|
369
|
//超时时间
|
383
|
//超时时间
|
370
|
$timeout_express = "1m";
|
384
|
$timeout_express = "1m";
|
371
|
|
385
|
|
|
@@ -383,11 +397,6 @@ class OrderController extends HomeBaseController |
|
@@ -383,11 +397,6 @@ class OrderController extends HomeBaseController |
383
|
}
|
397
|
}
|
384
|
}
|
398
|
}
|
385
|
|
399
|
|
386
|
- //微信中转页面
|
|
|
387
|
- public function alipayDo() {
|
|
|
388
|
- return $this->fetch(':pay');
|
|
|
389
|
- }
|
|
|
390
|
-
|
|
|
391
|
//支付宝回调
|
400
|
//支付宝回调
|
392
|
public function alipayNotify() {
|
401
|
public function alipayNotify() {
|
393
|
|
402
|
|