|
@@ -601,7 +601,6 @@ class Order extends Api |
|
@@ -601,7 +601,6 @@ class Order extends Api |
601
|
$model = new \app\api\model\Order();
|
601
|
$model = new \app\api\model\Order();
|
602
|
$order = $model::get($order_id);
|
602
|
$order = $model::get($order_id);
|
603
|
if (!$order) $this->error('订单不存在');
|
603
|
if (!$order) $this->error('订单不存在');
|
604
|
-// $third = Third::get(['user_id'=>$this->auth->id]);
|
|
|
605
|
$third = Third::alias('a')
|
604
|
$third = Third::alias('a')
|
606
|
->join('user b','b.id = a.user_id')
|
605
|
->join('user b','b.id = a.user_id')
|
607
|
->where('a.user_id',$order['user_id'])
|
606
|
->where('a.user_id',$order['user_id'])
|
|
@@ -629,16 +628,14 @@ class Order extends Api |
|
@@ -629,16 +628,14 @@ class Order extends Api |
629
|
'type' => 'wechat',
|
628
|
'type' => 'wechat',
|
630
|
'orderid' => $order['order_no'],
|
629
|
'orderid' => $order['order_no'],
|
631
|
'title' => '订单号-'.$order['order_no'],
|
630
|
'title' => '订单号-'.$order['order_no'],
|
632
|
-// 'amount' => $order['pay_price'],
|
|
|
633
|
- 'amount' => 0.01,
|
631
|
+ 'amount' => $order['pay_price'],
|
|
|
632
|
+// 'amount' => 0.01,
|
634
|
'method' => 'miniapp',
|
633
|
'method' => 'miniapp',
|
635
|
'openid' => $openid,
|
634
|
'openid' => $openid,
|
636
|
'notifyurl' => $this->request->domain().'/api/notify/orderNotify/type/wechat',
|
635
|
'notifyurl' => $this->request->domain().'/api/notify/orderNotify/type/wechat',
|
637
|
'returnurl' => '',
|
636
|
'returnurl' => '',
|
638
|
];
|
637
|
];
|
639
|
$result = Service::submitOrder($params);
|
638
|
$result = Service::submitOrder($params);
|
640
|
-// $order->pay_user_id = $this->auth->id;
|
|
|
641
|
-// $order->isUpdate()->save();
|
|
|
642
|
$this->success('支付信息',$result);
|
639
|
$this->success('支付信息',$result);
|
643
|
}
|
640
|
}
|
644
|
|
641
|
|
|
@@ -759,10 +756,10 @@ class Order extends Api |
|
@@ -759,10 +756,10 @@ class Order extends Api |
759
|
$wechat = Pay::wechat($config);
|
756
|
$wechat = Pay::wechat($config);
|
760
|
$refund_no = 'LQ-'.time().mt_rand(10000,99999);
|
757
|
$refund_no = 'LQ-'.time().mt_rand(10000,99999);
|
761
|
$param = [
|
758
|
$param = [
|
762
|
-// 'total_fee' => $order['pay_price'],
|
|
|
763
|
-// 'refund_fee' => $order['pay_price'],
|
|
|
764
|
- 'total_fee' => 1,
|
|
|
765
|
- 'refund_fee' => 1,
|
759
|
+ 'total_fee' => $order['pay_price'],
|
|
|
760
|
+ 'refund_fee' => $order['pay_price'],
|
|
|
761
|
+// 'total_fee' => 1,
|
|
|
762
|
+// 'refund_fee' => 1,
|
766
|
'out_trade_no' => $order['order_no'],
|
763
|
'out_trade_no' => $order['order_no'],
|
767
|
'out_refund_no' => $refund_no
|
764
|
'out_refund_no' => $refund_no
|
768
|
];
|
765
|
];
|