WIN-2308041133\Administrator преди 2 седмици
родител
ревизия
b8b7e71b5b
променени са 1 файла, в които са добавени 8 реда и са изтрити 2 реда
  1. 8 2
      app/api/controller/order/StoreOrderController.php

+ 8 - 2
app/api/controller/order/StoreOrderController.php

@@ -205,12 +205,16 @@ class StoreOrderController
                     if (bcsub((float)$orderInfo['pay_price'], 0, 2) <= 0) {
                         //创建订单jspay支付
                         $payPriceStatus = StoreOrder::jsPayPrice($orderId, $uid, $formId);
-                        if ($payPriceStatus)//0元支付成功
+                        if ($payPriceStatus){//0元支付成功
                             return app('json')->status('success', '微信支付成功', $info);
-                        else
+                        } else{
+
                             return app('json')->status('pay_error', StoreOrder::getErrorInfo());
+                        }
+
                     } else {
                         try {
+                            @file_put_contents('quanju.txt',  $from."-微信支付方式\r\n", 8);
                             if ($from == 'routine') {
                                 $jsConfig = OrderRepository::jsPay($orderId); //创建订单jspay
                             } else if ($from == 'weixinh5') {
@@ -218,7 +222,9 @@ class StoreOrderController
                             } else {
                                 $jsConfig = OrderRepository::wxPay($orderId);
                             }
+                            @file_put_contents('quanju.txt',  $jsConfig."-微信支付失败2\r\n", 8);
                         } catch (\Exception $e) {
+                            @file_put_contents('quanju.txt',  $e->getMessage()."-微信支付失败\r\n", 8);
                             return app('json')->status('pay_error', $e->getMessage(), $info);
                         }
                         $info['jsConfig'] = $jsConfig;