davide.cucurnia@vola.it
2024-01-31 cc9b7313d20cdf6aad136d0ae10fae20d63345aa
compressed responses
1 files added
2 files modified
2 files deleted
242 ■■■■■ changed files
app/Console/Commands/CreateUserCommand.php 91 ●●●●● patch | view | raw | blame | history
app/Http/Controllers/FakeResponder/FakeResponder.php 17 ●●●● patch | view | raw | blame | history
app/Http/Requests/SendMailSend.php 45 ●●●●● patch | view | raw | blame | history
config/custom.php 2 ●●●●● patch | view | raw | blame | history
resources/xml/getInfoActivationWSC.blade.php 87 ●●●●● patch | view | raw | blame | history
app/Console/Commands/CreateUserCommand.php
File was deleted
app/Http/Controllers/FakeResponder/FakeResponder.php
@@ -22,23 +22,22 @@
        $this->headers = [
            "Content-Type" => 'text/xml',
        ];
        if (config('custom.compressed_responses',false) === TRUE) {
            $this->headers['content-encoding'] = 'gzip';
        }
    }
    public function manageLegacyRequest(Request $request)
    {
        if (isset($_COOKIE[$this->cookieFakeSSOName])) {
            /*
            $params = $request->query();
            if (!isset($_COOKIE[$this->cookieFakeSSOName]) && (isset($params["t"]))) {
                $testUser = $params["t"];
            }
            */
            $testUser = intval(str_replace("xno:", "", $_COOKIE[$this->cookieFakeSSOName]));
            $responseContent = $this->VolaFakeSSO->getResponses($request, $testUser);
            $this->logRequest($request, $responseContent, "SSO Legacy");
            $responseContent = (config('custom.compressed_responses',false) === TRUE) ? gzencode($responseContent, 3) : $responseContent;
            return response($responseContent, 200, $this->headers);
        } else {
            \Log::channel('requests_failed')->debug($request->url() . ' : Nessun cookie di sessione '.$this->cookieFakeSSOName);
            \Log::channel('requests_failed')->debug($request->url() . "\nNessun cookie di sessione ".$this->cookieFakeSSOName);
            return response('No cookie', 400, $this->headers);
        }
    }
@@ -48,10 +47,12 @@
        if (isset($_COOKIE[$this->cookieFakePicassoName])) {
            $testUser = intval(str_replace("xno:", "", $_COOKIE[$this->cookieFakePicassoName]));
            $responseContent = $this->VolaFakeSSO->getResponses($request, $testUser, true);
            $this->logRequest($request, $responseContent, "Picasso");
            $responseContent = (config('custom.compressed_responses',false) === TRUE) ? gzencode($responseContent, 3) : $responseContent;
            return response($responseContent, 200, $this->headers);
        } else {
            \Log::channel('requests_failed')->debug("Picasso " . $request->url() . ' : Nessun cookie di sessione '.$this->cookieFakePicassoName);
            \Log::channel('requests_failed')->debug("Picasso " . $request->url() . "\nNessun cookie di sessione ".$this->cookieFakePicassoName);
            return response('No cookie', 400, $this->headers);
        }
    }
app/Http/Requests/SendMailSend.php
File was deleted
config/custom.php
@@ -4,6 +4,8 @@
    'log_all_requests' => env('LOG_ALL_REQUESTS', true),
    'compressed_responses' => env('GZIP_COMPRESS_RESPONSES', false),
    'portals_shortcuts' => [
        "assistenza.local.it" => "https://assistenza.local.it/dual",
        "pianizero" => "#",
resources/xml/getInfoActivationWSC.blade.php
New file
@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<getInfoActivationWSC>
    <catalog>
        <channel>SSO</channel>
        <providerID></providerID>
        <appidID></appidID>
        <selectedBoId>{{$selectedMSISDN}}</selectedBoId>
        <selectedBoType>SIM_MOBILE</selectedBoType>
        <username>{{$username}}</username>
        <readOnlyCondition></readOnlyCondition>
        <showcase>
            <showcaseId>27</showcaseId>
            <showcaseDescription>Vetrina Elite</showcaseDescription>
            <tabs>
                <tabPosition>1</tabPosition>
                <tabDescription>new Corporate Infoattivazione Showcase</tabDescription>
                <tabId>17</tabId>
                <sections>
                    <collapsed>N</collapsed>
                    <sectionPosition>20</sectionPosition>
                    <sectionDescription>Tutti gli altri servizi</sectionDescription>
                    <sectionId>112</sectionId>
                    @foreach($products as $product)
                    <products>
                        <productId>{{rand(300,400}}</productId>
                        <activationDate>
                            <time>1702249200000</time>
                        </activationDate>
                        <changeStateDate>
                            <time>1702249200000</time>
                        </changeStateDate>
                        <inheritanceRule></inheritanceRule>
                        <buyCost>0.0</buyCost>
                        <frequency></frequency>
                        <infoRecurringFees>N</infoRecurringFees>
                        <invertStatus>N</invertStatus>
                        <maxNumOfTry>0</maxNumOfTry>
                        <monopoliFlag>N</monopoliFlag>
                        <longDescription>{{$product["description"]}}</longDescription>
                        <longName>{{$product["name"]}}</longName>
                        <productPosition>1</productPosition>
                        <numberOfUsedTry>0</numberOfUsedTry>
                        <numberOfTryAvailable>0</numberOfTryAvailable>
                        <OMProductId>{{$product["OMProductId"]}}</OMProductId>
                        <OMSource>CCBS</OMSource>
                        <productType>Service</productType>
                        <shortDescription>{{$product["description"]}}</shortDescription>
                        <shortName>{{$product["name"]}}</shortName>
                        <productStateOnSim>ACTIVE</productStateOnSim>
                        <spyderId></spyderId>
                        <flagCommitment></flagCommitment>
                        <mm4MPromoId></mm4MPromoId>
                        <idJoin></idJoin>
                        <lastPaidFlag></lastPaidFlag>
                        <offerType></offerType>
                        <lastChargeZeroReason></lastChargeZeroReason>
                    </products>
                    @endforeach
                    <____hashCodeCalc>false</____hashCodeCalc>
                </sections>
                <____hashCodeCalc>false</____hashCodeCalc>
            </tabs>
            <____hashCodeCalc>false</____hashCodeCalc>
        </showcase>
        <tmProduct>
            <tmCode>2494</tmCode>
            <description>TM9 Ricaricabile P30</description>
            <activationDate>
                <time>1696244062000</time>
            </activationDate>
            <____hashCodeCalc>false</____hashCodeCalc>
        </tmProduct>
        <convergentOffer>
            <rewardID></rewardID>
            <groupTypeID></groupTypeID>
            <hungReasonID></hungReasonID>
            <cli></cli>
            <status></status>
        </convergentOffer>
    </catalog>
    <operationStatus>
        <status>OK</status>
        <errCode>0</errCode>
        <diagnostic>SUCCESS</diagnostic>
        <____hashCodeCalc>false</____hashCodeCalc>
    </operationStatus>
</getInfoActivationWSC>