Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\En..

Decoded Output download

<?php 
 declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint; use OneTeamSoftware\Cache\CacheInterface; use OneTeamSoftware\Cache\KeyGeneratorInterface; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\EndPoint\AbstractEndPoint; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\Payload; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\TypesInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint\RateFilter\RateFilter; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ShipmentPayload; class GetRates extends AbstractEndPoint { private $shipmentPayload; private $rateFilter; public function __construct(string $dvCmj, TypesInterface $OmTeq, LoggerInterface $XQ5SE, CacheInterface $bFD7q, KeyGeneratorInterface $hg1l_, Payload $msqzG) { parent::__construct($dvCmj, $OmTeq, $XQ5SE, $bFD7q, $hg1l_, $msqzG); $this->shipmentPayload = new ShipmentPayload($msqzG, $OmTeq); $this->rateFilter = new RateFilter($this->logger, new ServiceIdBuilder(), $OmTeq->getPackageTypes()); } public function canUse() : bool { return true; } public function getMethod() : string { return "POST"; } public function getRoute() : string { return "shipments/getrates"; } public function getPostData() : array { $ChvBO = []; $ChvBO["carrierCode"] = $this->shipmentPayload->getCarrierCode(); $fYnpz = $this->shipmentPayload->getPackageCode(); if ("package" !== $fYnpz) { $ChvBO["packageCode"] = $fYnpz; } $ChvBO["fromPostalCode"] = $this->shipmentPayload->getFromPostalCode(); $ChvBO += $this->shipmentPayload->getToAddress(); $ChvBO["weight"] = $this->shipmentPayload->getWeight(); $ChvBO["dimensions"] = $this->shipmentPayload->getDimensions(); $ChvBO["confirmation"] = $this->shipmentPayload->getConfirmation(); $ChvBO["residential"] = $this->shipmentPayload->isToAddressResidential(); $ChvBO = array_filter($ChvBO); $this->logger->debug(__FILE__, 115, "getPostData: %s", print_r($ChvBO, true)); return $ChvBO; } public function getResponse(array $p1oKo) : array { if (isset($p1oKo["Message"]) || isset($p1oKo["ExceptionMessage"])) { return []; } $this->logger->debug(__FILE__, 132, "getResponse: %s", print_r($p1oKo, true)); $VXihx = $this->shipmentPayload->getCarrierCode(); $zPrN3 = $this->shipmentPayload->getPackageCode(); $aReSk = $this->types->getPackageTypes()->getValue($zPrN3, ''); $this->logger->debug(__FILE__, 138, "Package Type Name: %s", $aReSk); $kKIkZ = []; foreach ($p1oKo as $nJ3w7) { $tFo39 = $this->rateFilter->filter($nJ3w7, $VXihx, $aReSk); if (false === empty($tFo39)) { $kKIkZ[$tFo39["service"]] = $tFo39; } OGnd8: } L52QH: $UT5XJ = []; $UT5XJ["shipment"]["rates"] = $kKIkZ; $this->logger->debug(__FILE__, 152, "New Response: %s", print_r($UT5XJ, true)); return $UT5XJ; } } 
 ?>

Did this file decode correctly?

Original Code

<?php
 declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint; use OneTeamSoftware\Cache\CacheInterface; use OneTeamSoftware\Cache\KeyGeneratorInterface; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\EndPoint\AbstractEndPoint; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\Payload; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\TypesInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint\RateFilter\RateFilter; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ShipmentPayload; class GetRates extends AbstractEndPoint { private $shipmentPayload; private $rateFilter; public function __construct(string $dvCmj, TypesInterface $OmTeq, LoggerInterface $XQ5SE, CacheInterface $bFD7q, KeyGeneratorInterface $hg1l_, Payload $msqzG) { parent::__construct($dvCmj, $OmTeq, $XQ5SE, $bFD7q, $hg1l_, $msqzG); $this->shipmentPayload = new ShipmentPayload($msqzG, $OmTeq); $this->rateFilter = new RateFilter($this->logger, new ServiceIdBuilder(), $OmTeq->getPackageTypes()); } public function canUse() : bool { return true; } public function getMethod() : string { return "\x50\x4f\x53\124"; } public function getRoute() : string { return "\163\x68\x69\x70\x6d\x65\x6e\x74\163\x2f\147\x65\164\162\x61\x74\145\163"; } public function getPostData() : array { $ChvBO = []; $ChvBO["\x63\x61\x72\x72\x69\145\162\103\157\144\145"] = $this->shipmentPayload->getCarrierCode(); $fYnpz = $this->shipmentPayload->getPackageCode(); if ("\x70\141\143\153\x61\x67\x65" !== $fYnpz) { $ChvBO["\x70\x61\x63\x6b\141\x67\145\103\157\144\145"] = $fYnpz; } $ChvBO["\x66\x72\x6f\x6d\120\x6f\x73\x74\141\154\103\157\x64\145"] = $this->shipmentPayload->getFromPostalCode(); $ChvBO += $this->shipmentPayload->getToAddress(); $ChvBO["\x77\x65\x69\147\150\x74"] = $this->shipmentPayload->getWeight(); $ChvBO["\x64\x69\x6d\145\x6e\163\151\157\x6e\x73"] = $this->shipmentPayload->getDimensions(); $ChvBO["\x63\x6f\x6e\146\151\162\x6d\141\164\151\x6f\x6e"] = $this->shipmentPayload->getConfirmation(); $ChvBO["\x72\x65\163\151\144\145\x6e\x74\151\x61\x6c"] = $this->shipmentPayload->isToAddressResidential(); $ChvBO = array_filter($ChvBO); $this->logger->debug(__FILE__, 115, "\147\x65\x74\x50\x6f\x73\x74\x44\141\x74\141\x3a\x20\45\x73", print_r($ChvBO, true)); return $ChvBO; } public function getResponse(array $p1oKo) : array { if (isset($p1oKo["\115\145\163\163\141\x67\145"]) || isset($p1oKo["\105\x78\143\x65\x70\164\151\157\156\x4d\x65\163\x73\141\147\x65"])) { return []; } $this->logger->debug(__FILE__, 132, "\x67\x65\x74\x52\x65\163\160\x6f\x6e\163\145\x3a\40\45\163", print_r($p1oKo, true)); $VXihx = $this->shipmentPayload->getCarrierCode(); $zPrN3 = $this->shipmentPayload->getPackageCode(); $aReSk = $this->types->getPackageTypes()->getValue($zPrN3, ''); $this->logger->debug(__FILE__, 138, "\x50\141\143\153\x61\147\x65\40\x54\171\x70\145\40\116\141\155\145\72\x20\x25\163", $aReSk); $kKIkZ = []; foreach ($p1oKo as $nJ3w7) { $tFo39 = $this->rateFilter->filter($nJ3w7, $VXihx, $aReSk); if (false === empty($tFo39)) { $kKIkZ[$tFo39["\163\x65\x72\166\151\x63\145"]] = $tFo39; } OGnd8: } L52QH: $UT5XJ = []; $UT5XJ["\163\x68\151\160\x6d\x65\x6e\x74"]["\162\141\164\145\x73"] = $kKIkZ; $this->logger->debug(__FILE__, 152, "\x4e\x65\x77\x20\x52\145\x73\x70\157\x6e\163\145\72\x20\x25\x73", print_r($UT5XJ, true)); return $UT5XJ; } }

Function Calls

None

Variables

None

Stats

MD5 aec0ff2158bbedfbc6707948d41e547f
Eval Count 0
Decode Time 56 ms