fly 5 年之前
父節點
當前提交
abfc1c904a
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      app/Http/Controllers/QuickApp/Order/OrdersController.php

+ 5 - 4
app/Http/Controllers/QuickApp/Order/OrdersController.php

@@ -27,6 +27,7 @@ use App\Modules\Trade\Models\PayMerchant;
 use App\Modules\Trade\Pay\OrderArousePayFactory;
 use App\Modules\Trade\Pay\OrderArousePayFactory;
 use App\Modules\Trade\Pay\OrderPaySuccess;
 use App\Modules\Trade\Pay\OrderPaySuccess;
 use App\Modules\Trade\Services\PayMerchantService;
 use App\Modules\Trade\Services\PayMerchantService;
+use EasyWeChat\Support\XML;
 use Exception;
 use Exception;
 use Log;
 use Log;
 
 
@@ -616,11 +617,11 @@ class OrdersController extends BaseController
      */
      */
     function wxback(Request $request)
     function wxback(Request $request)
     {
     {
-        $param = $request->except('_url');
-        myLog('wxpay')->info($param);
-        if (isset($param['attach'])) {
+        $xml = XML::parse(strval($request->getContent()));
+        myLog('wxpay')->info($xml);
+        if (isset($xml['attach'])) {
 
 
-            $pay_merchant_name = $param['attach'];
+            $pay_merchant_name = $xml['attach'];
             $config = PayMerchantService::getPayConfigByNameStatic($pay_merchant_name);
             $config = PayMerchantService::getPayConfigByNameStatic($pay_merchant_name);
             $app = PayFactory::official($config);
             $app = PayFactory::official($config);
             $response = $app->notify()->handleNotify(function ($notify, $successful) {
             $response = $app->notify()->handleNotify(function ($notify, $successful) {