shish 9 months ago
parent
commit
251830c5de
1 changed files with 5 additions and 8 deletions
  1. 5 8
      app-ghs/controllers/TestController.php

+ 5 - 8
app-ghs/controllers/TestController.php

@@ -1431,27 +1431,24 @@ class TestController extends BaseController
             'lklCertificatePath' => $lklCertificatePath,
         ];
         $laResource = new Lakala($params);
-        $list = CustomRechargeClass::getAllByCondition(['shopId' => $shopId, 'customId' => 38235], null, 'id,orderSn,returnCode,payReturnCode', null, true);
+        $list = CustomRechargeClass::getAllByCondition(['shopId' => $shopId, 'customId' => 38855], null, 'id,orderSn,returnCode', null, true);
         if (!empty($list)) {
             foreach ($list as $k => $v) {
                 $returnCode = $v->returnCode ?? '';
-                $payReturnCode = $v->payReturnCode ?? '';
-                //if (!empty($returnCode) && empty($payReturnCode)) {
-                    //$orderSn = $v->orderSn ?? "";
-                $orderSn = 'CRS69287';
+                if (!empty($returnCode)) {
+                    $orderSn = $v->orderSn ?? "";
                     $queryParams = [
                         'orderSn' => $orderSn,
                         //'tradeNo' => '66221061685504',
                     ];
                     $response = $laResource->query($queryParams, 0);
-                    print_r($response);die;
                     $acc_trade_no = $response['resp_data']['acc_trade_no'] ?? '';
                     if (!empty($acc_trade_no)) {
                         $v->payReturnCode = $acc_trade_no;
                         $v->save();
-                        echo $acc_trade_no . ' | ';
+                        echo $acc_trade_no.' | ';
                     }
-                //}
+                }
             }
         }