Pārlūkot izejas kodu

修复支付问题

chenxiqiang 6 gadus atpakaļ
vecāks
revīzija
1b90dd1e4c

+ 1
- 2
manage-server/app/Http/Controllers/PaymentController.php Parādīt failu

27
         if ($wechat_id && $order) {
27
         if ($wechat_id && $order) {
28
             $out_trade_no = $order_type . "_" . $order_id;
28
             $out_trade_no = $order_type . "_" . $order_id;
29
             $app = app('wechat.payment');
29
             $app = app('wechat.payment');
30
-            dd(substr(Carbon::now()->addHour()->format('YmdHisu'), 0,15));
31
 
30
 
32
             $result = $app->order->unify([
31
             $result = $app->order->unify([
33
                 'body' => '玥子轩家政',
32
                 'body' => '玥子轩家政',
35
                 'total_fee' => $order->price * 100,
34
                 'total_fee' => $order->price * 100,
36
                 'trade_type' => 'JSAPI',
35
                 'trade_type' => 'JSAPI',
37
                 'openid' => $wechat_id,
36
                 'openid' => $wechat_id,
38
-                'time_expire' => substr(Carbon::now()->addHour()->format('YmdHisu'), 0,15)
37
+                'time_expire' => Carbon::now()->addHour()->format('YmdHis')
39
             ]);
38
             ]);
40
 
39
 
41
             if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') {
40
             if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') {

Loading…
Atcelt
Saglabāt