From ca6434daa9ea96df47c3197391a75a06466ebfc0 Mon Sep 17 00:00:00 2001
From: davide.cucurnia@vola.it <davide.cucurnia@vola.it>
Date: Mon, 05 Feb 2024 11:33:26 +0100
Subject: [PATCH] conversione parametro t (token) in parametro k (keysite)

---
 app/Vola/Services/VolaFakeHTTPResponder/VolaFakeHTTPResponder.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/Vola/Services/VolaFakeHTTPResponder/VolaFakeHTTPResponder.php b/app/Vola/Services/VolaFakeHTTPResponder/VolaFakeHTTPResponder.php
index 8d7917b..f2f68c2 100644
--- a/app/Vola/Services/VolaFakeHTTPResponder/VolaFakeHTTPResponder.php
+++ b/app/Vola/Services/VolaFakeHTTPResponder/VolaFakeHTTPResponder.php
@@ -51,7 +51,7 @@
             if (!isset($this->sso_XML[$testUser]["picasso"])) {
                 return 'this picasso user doesnt exist. check your SSOSESSIONID value';
             }
-            $sampleResponseString = Arr::first($this->sso_XML[$testUser]["picasso"]["getWebcustomerInformation"]["parametri"]["t"] );
+            $sampleResponseString = Arr::first($this->sso_XML[$testUser]["picasso"]["getWebcustomerInformation"]["parametri"]["k"] );
             $sampleResponseObject = Utils::convertXMLStrToArray($sampleResponseString);
             $resp = [
                 'logged' => (string) 1,
@@ -76,7 +76,7 @@
             if (!isset($this->sso_XML[$testUser]["sso"])) {
                 return 'this user doesnt exist. check your CAuthCookie value';
             }
-            $sampleResponseString = Arr::first($this->sso_XML[$testUser]["sso"]["getWebcustomerInformation"]["parametri"]["t"] );
+            $sampleResponseString = Arr::first($this->sso_XML[$testUser]["sso"]["getWebcustomerInformation"]["parametri"]["k"] );
             $sampleResponseObject = Utils::convertXMLStrToArray($sampleResponseString);
             $resp = [
                 'logged' => (string) 1,
@@ -103,7 +103,7 @@
         //assumo che se la richiesta sia arrivata fin qui abbia tutti i mandatory nel url
         foreach ($reqParams as $key => $value) {
             //verifico se il metodo dell' utente ha la chiave che sto cercando
-            if ($key != "t" && isset($params[$key])) {
+            if ($key != "k" && isset($params[$key])) {
                 if (array_key_exists($value, $params[$key])) {
                     \Log::channel('requests')->debug("[VolaFakeHTTPResponder] Inserisco xml specifico per key:$key ,params: " . print_r($params, 1) . " key: $key, value: $value, xml: " . print_r($params[$key][$value], 1));
                     return $params[$key][$value];
@@ -111,7 +111,7 @@
             }
         }
         //xml di default (se richiede parametri di default conterrĂ  errori)
-        $defaultResponse = Arr::first($params["t"]);
+        $defaultResponse = Arr::first($params["k"]);
         \Log::channel('requests')->debug("[VolaFakeHTTPResponder] Inserisco xml di default $defaultResponse per method: $methodUri");
         return $defaultResponse;
     }

--
Gitblit v1.8.0