|
@@ -6,6 +6,7 @@ use cmf\controller\HomeBaseController; |
|
@@ -6,6 +6,7 @@ use cmf\controller\HomeBaseController; |
6
|
use EasyWeChat\Foundation\Application;
|
6
|
use EasyWeChat\Foundation\Application;
|
7
|
use EasyWeChat\Payment\Order;
|
7
|
use EasyWeChat\Payment\Order;
|
8
|
use think\Db;
|
8
|
use think\Db;
|
|
|
9
|
+use app\portal\controller\BirdController;
|
9
|
|
10
|
|
10
|
/**
|
11
|
/**
|
11
|
* 微信支付,退款,提现DEMO
|
12
|
* 微信支付,退款,提现DEMO
|
|
@@ -87,6 +88,11 @@ class PayController extends HomeBaseController |
|
@@ -87,6 +88,11 @@ class PayController extends HomeBaseController |
87
|
//查询订单信息
|
88
|
//查询订单信息
|
88
|
$order = Db::name('indent')->where('order_number',$out_trade_no)->find();
|
89
|
$order = Db::name('indent')->where('order_number',$out_trade_no)->find();
|
89
|
if($successful){
|
90
|
if($successful){
|
|
|
91
|
+ $bird = new BirdController;
|
|
|
92
|
+ $takeOrder = $bird -> takeOrder($order['id']);
|
|
|
93
|
+ $createOrder = $bird -> createOrder($order['id']);
|
|
|
94
|
+ cache('dingyue',$takeOrder);
|
|
|
95
|
+ cache('yuyue',$createOrder);
|
90
|
$update['state'] = 2;
|
96
|
$update['state'] = 2;
|
91
|
//更新订单状态为待发货
|
97
|
//更新订单状态为待发货
|
92
|
Db::name('indent')->where('order_number',$out_trade_no)->update($update);
|
98
|
Db::name('indent')->where('order_number',$out_trade_no)->update($update);
|