Jelajahi Sumber

付款查询

shish 2 tahun lalu
induk
melakukan
7ceeea388e
1 mengubah file dengan 10 tambahan dan 12 penghapusan
  1. 10 12
      app-ghs/controllers/TestController.php

+ 10 - 12
app-ghs/controllers/TestController.php

@@ -376,29 +376,27 @@ class TestController extends BaseController
 
     public function actionQuery()
     {
-//        $shopId = 1527;
-//        $shop = ShopClass::getById($shopId, true);
-//        if (empty($shop)) {
-//            util::stop('没有找到门店');
-//        }
+        $shopId = 726;
+        $shop = ShopClass::getById($shopId, true);
+        if (empty($shop)) {
+            util::stop('没有找到门店');
+        }
         $merchantPrivateKeyPath = Yii::getAlias("@vendor/lakala") . '/production/api_private_key.pem';
         $lklCertificatePath = Yii::getAlias("@vendor/lakala") . '/production/lkl-apigw-v1.cer';
         $params = [
             'appid' => 'OP00002119',
             'serial_no' => '018b08cfddbd',
-            //'merchant_no' => $shop->lklSjNo,
-            'merchant_no' => '82222105992004A',
-            //'term_no' => $shop->lklScanTermNo,
-            'term_no' => 'H3656802',
+            'merchant_no' => $shop->lklSjNo,
+            'term_no' => $shop->lklScanTermNo,
             'merchantPrivateKeyPath' => $merchantPrivateKeyPath,
             'lklCertificatePath' => $lklCertificatePath,
         ];
         $laResource = new Lakala($params);
         $queryParams = [
-            //'orderSn' => 'KD26452235',
-            'tradeNo' => '20231230110113130266215700775011',
+            'orderSn' => 'KD26481486',
+            //'tradeNo' => '20231230110113130266215700775011',
         ];
-        $response = $laResource->query($queryParams, 1);
+        $response = $laResource->query($queryParams, 0);
         echo "<pre>";
         print_r($response);
     }