gorden 6 months ago
parent
commit
a45275df70

+ 2 - 2
app/admin/controller/notify/OrderPayController.php

@@ -16,7 +16,7 @@ class OrderPayController
 //            $config['notify_url'] = getenv('NOTIFY_DOMAIN_ADMIN').'/notify/orderPay/wxpay';
 //            Pay::wechat($config)->success()->send();
 
-            exit('<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>');
+            echo '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
         }catch (\Exception $e){
             Log::channel('pay')->info("WXPAY_NOTIFY_REPLY_FAIL", ['msg'=>"回复失败"]);
         }
@@ -31,7 +31,7 @@ class OrderPayController
 //            $config['notify_url'] = getenv('NOTIFY_DOMAIN_ADMIN').'/notify/orderPay/alipay';
 //            Pay::alipay($config)->success()->send();
             header('Content-type: application/json');
-            exit(json_encode(['code' => '200', 'msg' => 'success']));
+            echo json_encode(['code' => '200', 'msg' => 'success']);
         }catch (\Exception $e){
             Log::channel('pay')->info("ALIPAY_NOTIFY_REPLY_FAIL", ['msg'=>"回复失败"]);
         }

+ 4 - 4
app/admin/service/order/OrderService.php

@@ -279,8 +279,8 @@ class OrderService
     public static function findWxpay($orderId, $nbr = 0)
     {
         try {
-//            $result = Pay::wechat(config('payment.wxpay'))->find($orderId, 'pos');
-//            $result = json_decode(json_encode($result), true);
+            $result = Pay::wechat(config('payment.wxpay'))->find($orderId, 'pos');
+            $result = json_decode(json_encode($result), true);
         } catch (\Exception $e) {
             SupportLog::channel('pay')->error("FIND_WXPAY", ['msg' => $e->getMessage()]);
         }
@@ -312,8 +312,8 @@ class OrderService
     public static function findAlipay($orderId, $nbr = 0)
     {
         try {
-//            $result = Pay::alipay(config('payment.alipay'))->find($orderId);
-//            $result = json_decode(json_encode($result), true);
+            $result = Pay::alipay(config('payment.alipay'))->find($orderId);
+            $result = json_decode(json_encode($result), true);
         } catch (\Exception $e) {
             SupportLog::channel('pay')->error("FIND_ALIPAY", ['msg' => $e->getMessage()]);
         }