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\RateFilter; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\CollectionInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; class RateFilter { private $logger; private $serviceIdBuilder; private $packageTypes; public function __construct(LoggerInterface $W61zV, ServiceIdBuilder $r_1pl, CollectionInterface $uHYRs) { $this->logger = $W61zV; $this->serviceIdBuilder = $r_1pl; $this->packageTypes = $uHYRs; } public function filter(array $BxOtd, string $NEQyk, string $UcJia) : array { $this->logger->debug(__FILE__, 62, "filter: %s", print_r($BxOtd, true)); if (empty($BxOtd["serviceCode"]) || empty($BxOtd["serviceName"]) || empty($BxOtd["shipmentCost"]) || false === isset($BxOtd["otherCost"])) { $this->logger->debug(__FILE__, 70, "Rate does not have serviceName, shipmentCost or otherCost set, so skip might be invalid"); return []; } $GeYuX = $this->serviceIdBuilder->build($NEQyk, $BxOtd["serviceCode"]); $QCEBt = $BxOtd["serviceName"]; list($QCEBt, $m9Dqk) = $this->getServiceAndPackageTypeNamesPair($QCEBt, $UcJia); if (strtolower($UcJia) !== strtolower($m9Dqk)) { $this->logger->debug(__FILE__, 80, "Package type %s does not match %s", $m9Dqk, $UcJia); return []; } $kBWYZ = []; $kBWYZ["service"] = $GeYuX; $kBWYZ["postage_description"] = trim($QCEBt); $kBWYZ["cost"] = $BxOtd["shipmentCost"] + $BxOtd["otherCost"]; $this->logger->debug(__FILE__, 90, "Package type has matched, so return rate: %s", print_r($kBWYZ, true)); return $kBWYZ; } private function getServiceAndPackageTypeNamesPair(string $QCEBt, string $UcJia) : array { $eDUBw = explode("-", $QCEBt); if (2 !== count($eDUBw)) { $this->logger->debug(__FILE__, 106, "Service name does not contain a package type"); return [$QCEBt, $UcJia]; } $eDUBw = array_map("trim", $eDUBw); $m9Dqk = $eDUBw[1]; $this->logger->debug(__FILE__, 114, "Look up package type: %s", $m9Dqk); if ($this->packageTypes->has($m9Dqk)) { $this->logger->debug(__FILE__, 117, "Service name contains supported package type"); return $eDUBw; } $m9Dqk = strtolower($m9Dqk); if ($this->packageTypes->has($m9Dqk)) { $this->logger->debug(__FILE__, 126, "Service name contains supported package type"); return $eDUBw; } $this->logger->debug(__FILE__, 131, "Service name does not contain supported package type"); return [$QCEBt, $UcJia]; } }
?>
Did this file decode correctly?
Original Code
<?php
declare (strict_types=1); namespace OneTeamSoftware\ShippingCarrier\ShipStation\EndPoint\RateFilter; use OneTeamSoftware\Logger\LoggerInterface; use OneTeamSoftware\ShippingCarrier\AbstractAdapter\Type\CollectionInterface; use OneTeamSoftware\ShippingCarrier\ShipStation\Type\ServiceIdBuilder; class RateFilter { private $logger; private $serviceIdBuilder; private $packageTypes; public function __construct(LoggerInterface $W61zV, ServiceIdBuilder $r_1pl, CollectionInterface $uHYRs) { $this->logger = $W61zV; $this->serviceIdBuilder = $r_1pl; $this->packageTypes = $uHYRs; } public function filter(array $BxOtd, string $NEQyk, string $UcJia) : array { $this->logger->debug(__FILE__, 62, "\146\x69\154\164\145\162\72\40\x25\x73", print_r($BxOtd, true)); if (empty($BxOtd["\163\145\162\x76\x69\x63\x65\x43\x6f\144\x65"]) || empty($BxOtd["\163\145\162\x76\151\x63\x65\116\141\x6d\x65"]) || empty($BxOtd["\163\x68\x69\160\x6d\x65\156\164\103\x6f\163\x74"]) || false === isset($BxOtd["\x6f\164\x68\145\x72\103\157\x73\x74"])) { $this->logger->debug(__FILE__, 70, "\x52\141\164\x65\40\144\x6f\145\x73\40\x6e\x6f\x74\40\x68\141\166\x65\x20\163\145\162\x76\151\143\x65\x4e\141\155\145\54\40\x73\x68\151\160\x6d\145\156\x74\x43\x6f\163\x74\40\157\x72\x20\x6f\164\x68\x65\x72\103\x6f\163\164\40\x73\x65\x74\54\40\x73\157\40\x73\153\151\x70\x20\155\x69\x67\x68\x74\x20\142\x65\x20\x69\x6e\166\x61\154\151\144"); return []; } $GeYuX = $this->serviceIdBuilder->build($NEQyk, $BxOtd["\163\x65\162\x76\x69\x63\x65\103\157\x64\145"]); $QCEBt = $BxOtd["\x73\x65\x72\166\151\x63\x65\116\x61\x6d\x65"]; list($QCEBt, $m9Dqk) = $this->getServiceAndPackageTypeNamesPair($QCEBt, $UcJia); if (strtolower($UcJia) !== strtolower($m9Dqk)) { $this->logger->debug(__FILE__, 80, "\x50\x61\x63\153\x61\x67\145\40\x74\x79\160\145\x20\x25\x73\x20\144\157\x65\x73\40\156\x6f\x74\x20\x6d\141\x74\143\150\40\x25\163", $m9Dqk, $UcJia); return []; } $kBWYZ = []; $kBWYZ["\163\145\x72\x76\151\x63\x65"] = $GeYuX; $kBWYZ["\160\157\x73\164\x61\x67\145\137\144\x65\x73\143\162\x69\x70\164\151\157\156"] = trim($QCEBt); $kBWYZ["\143\x6f\x73\164"] = $BxOtd["\163\x68\151\160\155\145\156\164\x43\x6f\163\x74"] + $BxOtd["\157\164\x68\145\x72\103\157\163\164"]; $this->logger->debug(__FILE__, 90, "\x50\x61\143\x6b\141\147\145\40\164\x79\x70\x65\40\x68\x61\x73\40\x6d\141\x74\143\x68\145\144\x2c\40\163\x6f\40\162\145\164\x75\x72\x6e\x20\162\x61\164\x65\72\x20\x25\163", print_r($kBWYZ, true)); return $kBWYZ; } private function getServiceAndPackageTypeNamesPair(string $QCEBt, string $UcJia) : array { $eDUBw = explode("\x2d", $QCEBt); if (2 !== count($eDUBw)) { $this->logger->debug(__FILE__, 106, "\123\145\x72\166\x69\x63\x65\40\156\x61\155\x65\40\144\157\x65\x73\40\156\157\x74\x20\143\x6f\156\x74\141\x69\156\40\x61\40\x70\141\x63\x6b\x61\147\x65\40\164\171\x70\x65"); return [$QCEBt, $UcJia]; } $eDUBw = array_map("\x74\x72\151\155", $eDUBw); $m9Dqk = $eDUBw[1]; $this->logger->debug(__FILE__, 114, "\x4c\x6f\157\x6b\40\165\160\x20\160\x61\x63\153\141\147\x65\x20\164\x79\x70\145\72\x20\x25\163", $m9Dqk); if ($this->packageTypes->has($m9Dqk)) { $this->logger->debug(__FILE__, 117, "\123\x65\x72\166\151\143\x65\40\x6e\x61\155\x65\40\143\x6f\x6e\x74\x61\x69\156\x73\40\163\x75\160\x70\157\x72\164\x65\144\40\160\141\x63\x6b\141\x67\145\x20\164\171\160\145"); return $eDUBw; } $m9Dqk = strtolower($m9Dqk); if ($this->packageTypes->has($m9Dqk)) { $this->logger->debug(__FILE__, 126, "\x53\145\x72\x76\x69\x63\145\x20\x6e\141\x6d\145\x20\143\157\x6e\164\x61\x69\156\x73\x20\163\165\160\x70\x6f\x72\x74\x65\x64\x20\160\141\143\x6b\x61\147\145\40\x74\x79\160\x65"); return $eDUBw; } $this->logger->debug(__FILE__, 131, "\x53\145\x72\x76\x69\x63\145\x20\x6e\141\x6d\x65\x20\x64\157\x65\x73\40\x6e\x6f\x74\40\x63\x6f\156\x74\141\x69\156\x20\163\165\160\x70\157\162\x74\145\x64\40\160\x61\143\x6b\141\x67\x65\x20\164\171\160\x65"); return [$QCEBt, $UcJia]; } }
Function Calls
None |
Stats
MD5 | 096e5332ab563944de49f3bb99060849 |
Eval Count | 0 |
Decode Time | 66 ms |