shish 9 luni în urmă
părinte
comite
64bc6b1107
1 a modificat fișierele cu 29 adăugiri și 1 ștergeri
  1. 29 1
      app-ghs/controllers/TestController.php

+ 29 - 1
app-ghs/controllers/TestController.php

@@ -1409,4 +1409,32 @@ class TestController extends BaseController
         // clientId 后接状态:successed_online / successed_offline
         echo json_encode($rs);
     }
-}
+
+    public function actionRecharge()
+    {
+        $shopId = 36523;
+        $shop = ShopClass::getById($shopId, true);
+        if (empty($shop)) {
+            util::stop('没有找到门店,编号677230');
+        }
+        $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,
+            'term_no' => $shop->lklScanTermNo,
+            'merchantPrivateKeyPath' => $merchantPrivateKeyPath,
+            'lklCertificatePath' => $lklCertificatePath,
+        ];
+        $laResource = new Lakala($params);
+        $queryParams = [
+            'orderSn' => 'CRS_CS377',
+            //'tradeNo' => '66221061685504',
+        ];
+        $response = $laResource->query($queryParams, 0);
+        echo "<pre>";
+        print_r($response);
+    }
+
+}