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 /* DO NOT EDIT! Author : HP Web Design Website : https://hpwebd..

Decoded Output download

<?php 
/* 
DO NOT EDIT! 
Author          : HP Web Design 
Website         : https://hpwebdesign.id 
Support         : [email protected] 
License Type    : Single Domain License 
Licensing       : http://hpwebdesign.id/licensing 
*/ 
class Shipping 
{ 
  private $config; 
  private $customer; 
  private $session; 
  private $db; 
  private $cart; 
  private $tax; 
  private $weight; 
  public function __construct($registry) 
  { 
    goto JaDxW; 
    Mt28I: 
    $this->cart = $registry->get("cart"); 
    goto az6pE; 
    kHNcJ: 
    $this->tax = $registry->get("tax"); 
    goto JF155; 
    nzSZk: 
    $this->customer = $registry->get("customer"); 
    goto Yaspp; 
    Yaspp: 
    $this->session = $registry->get("session"); 
    goto V2K9M; 
    V2K9M: 
    $this->db = $registry->get("db"); 
    goto kHNcJ; 
    JaDxW: 
    $this->config = $registry->get("config"); 
    goto nzSZk; 
    JF155: 
    $this->weight = $registry->get("weight"); 
    goto Mt28I; 
    az6pE: 
  } 
  protected function translateServiceName($courierName, $serviceName, $is_ctc = null) 
  { 
    goto qI3CN; 
    GK51s: 
    kcqpS: 
    goto oaVJ1; 
    PGkpq: 
    if ($is_ctc) { 
      goto BxEau; 
    } 
    goto fLq2y; 
    LbZDB: 
    BxEau: 
    goto vEXqU; 
    fLq2y: 
    $jne_service = array("REG" => "REG", "YES" => "YES"); 
    goto wbPMi; 
    qI3CN: 
    $courierName = strtolower($courierName); 
    goto eJ6RC; 
    bSf87: 
    goto kcqpS; 
    goto n7LXS; 
    CKQuR: 
    return $serviceName; 
    goto bSf87; 
    L7SjF: 
    if (isset($data[$courierName][$serviceName])) { 
      goto SLR_3; 
    } 
    goto CKQuR; 
    wbPMi: 
    goto xJnPC; 
    goto LbZDB; 
    n7LXS: 
    SLR_3: 
    goto AyHG2; 
    vEXqU: 
    $jne_service = array("REG" => "CTC", "YES" => "CTCYES"); 
    goto S1xcW; 
    AyHG2: 
    return $data[$courierName][$serviceName]; 
    goto GK51s; 
    S1xcW: 
    xJnPC: 
    goto EDVr6; 
    eJ6RC: 
    $serviceName = $serviceName; 
    goto PGkpq; 
    EDVr6: 
    $data = array("jne" => $jne_service, "pos" => array("PAKETKILAT" => "Paket Kilat Khusus", "KILAT" => "Surat Kilat Khusus", "EXPRESS" => "Express Next Day Barang", "BIASA" => "Paketpos Biasa"), "idl" => array("IREG" => "iREG")); 
    goto L7SjF; 
    oaVJ1: 
  } 
  protected function getCache($key) 
  { 
    $cache = new \Cache("file"); 
    return $cache->get($key); 
  } 
  protected function setCache($key, $value) 
  { 
    $cache = new \Cache("file"); 
    return $cache->set($key, $value); 
  } 
  protected function getActiveCouriers() 
  { 
    goto xXAf9; 
    cIAt_: 
    foreach ($activeCourriers as $courier) { 
      goto xHe4J; 
      ucEyR: 
      $courriers[] = array("name" => strtolower($courierPart[0]), "service" => strtoupper($courierPart[1])); 
      goto eftDb; 
      xHe4J: 
      $courierPart = explode("_", $courier); 
      goto ucEyR; 
      eftDb: 
      PSaf3: 
      goto Ib8Ff; 
      Ib8Ff: 
    } 
    goto rAk6Y; 
    rAk6Y: 
    ACiKA: 
    goto XcnaS; 
    Sg4jk: 
    KTy8b: 
    goto cIAt_; 
    UHEcL: 
    return array(); 
    goto uLKJj; 
    DrHFW: 
    $courriers = array(); 
    goto EDLw0; 
    XcnaS: 
    return $courriers; 
    goto GYC4K; 
    xXAf9: 
    $activeCourriers = $this->config->get("module_bundle_preferred_shipping"); 
    goto DrHFW; 
    GYC4K: 
    TYNfB: 
    goto M2Z6M; 
    uLKJj: 
    goto TYNfB; 
    goto Sg4jk; 
    EDLw0: 
    if ($activeCourriers) { 
      goto KTy8b; 
    } 
    goto UHEcL; 
    M2Z6M: 
  } 
  protected function isCached($courrier, $origin_id, $dest_id, $weight) 
  { 
    goto sISzu; 
    sISzu: 
    $cacheKey = "hpwd." . $courrier . "." . $origin_id . "." . $dest_id . "." . $weight; 
    goto lfi4Y; 
    lfi4Y: 
    $cache = $this->getCache($cacheKey); 
    goto mXM14; 
    mXM14: 
    return $cache ? true : false; 
    goto zUMDZ; 
    zUMDZ: 
  } 
  protected function cacheCourriers($courriers, $origin_id, $dest_id, $weight) 
  { 
    goto NMitl; 
    my6rE: 
    curl_setopt_array($curl, array(CURLOPT_URL => "http://pro.rajaongkir.com/api/cost", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => http_build_query($requestBody), CURLOPT_HTTPHEADER => array("content-type: application/x-www-form-urlencoded", "key:  1545d32c7ff9012f8eaf4b2b34e34424"))); 
    goto esCSN; 
    OYC1O: 
    if (!($response["rajaongkir"]["status"]["code"] == 200)) { 
      goto TZ1d5; 
    } 
    goto vneQq; 
    MrbZA: 
    foreach ($results as $result) { 
      goto WNPmR; 
      gMF45: 
      goto PJ2ib; 
      goto Th16w; 
      tpAqu: 
      PJ2ib: 
      goto wwRYb; 
      Th16w: 
      BLJs1: 
      goto q8VLu; 
      wwRYb: 
      $this->setCache("hpwd." . strtolower($courrierName) . "." . $origin_id . "." . $dest_id . "." . $weight, json_encode($result["costs"])); 
      goto njTHi; 
      v1shM: 
      $courrierName = $result["code"]; 
      goto gMF45; 
      njTHi: 
      QD0me: 
      goto a3Oje; 
      q8VLu: 
      $courrierName = "jnt"; 
      goto tpAqu; 
      WNPmR: 
      if ($result["code"] == "J&T") { 
        goto BLJs1; 
      } 
      goto v1shM; 
      a3Oje: 
    } 
    goto JnYfw; 
    YCa0j: 
    return; 
    goto Uf7df; 
    YMc8O: 
    if ($err) { 
      goto NZNID; 
    } 
    goto jWblL; 
    RyeNK: 
    $results = array(); 
    goto OYC1O; 
    lJvFg: 
    $requestBody = array("origin" => $origin_id, "originType" => $originType, "destination" => $dest_id, "destinationType" => "subdistrict", "weight" => $weight, "courier" => strtolower(implode(":", $courriers))); 
    goto my6rE; 
    V5UbX: 
    curl_close($curl); 
    goto YMc8O; 
    Uf7df: 
    wPT6u: 
    goto pmnqj; 
    esCSN: 
    $res = curl_exec($curl); 
    goto f0CI5; 
    JnYfw: 
    td9nL: 
    goto BT5K5; 
    podSj: 
    NZNID: 
    goto YCa0j; 
    uTxek: 
    $key = $this->config->get("module_bundle_apitype") == "ownapi" ? $this->config->get("module_bundle_rajaongkirapi") : $this->config->get("hpwd_theq"); 
    goto j0XY_; 
    BT5K5: 
    goto wPT6u; 
    goto podSj; 
    SQ2ND: 
    TZ1d5: 
    goto MrbZA; 
    vneQq: 
    $results = $response["rajaongkir"]["results"]; 
    goto SQ2ND; 
    f0CI5: 
    $err = curl_error($curl); 
    goto V5UbX; 
    j0XY_: 
    $originType = "city"; 
    goto KtRM0; 
    jWblL: 
    $response = json_decode($res, true); 
    goto RyeNK; 
    NMitl: 
    $weight = $weight >= 1000 ? $weight : 1000; 
    goto uTxek; 
    KtRM0: 
    $curl = curl_init(); 
    goto lJvFg; 
    pmnqj: 
  } 
  public function getAllCourriersCost($origin_id, $dest_id) 
  { 
    goto CBUJQ; 
    CBUJQ: 
    $weight = $this->cart->getWeight(); 
    goto z6Y_G; 
    DoBii: 
    if (empty($courriers)) { 
      goto MJtJq; 
    } 
    goto f8fwj; 
    Xs09c: 
    foreach ($activeCouriers as $courrier) { 
      goto ivJrm; 
      u6cp7: 
      if (!($courrier["name"] == "dakota")) { 
        goto rF9dd; 
      } 
      goto LEak1; 
      BRJ8B: 
      Z1wJH: 
      goto W_z06; 
      xEoHw: 
      DVOju: 
      goto BRJ8B; 
      g2_qV: 
      $courriers[] = $courrier["name"]; 
      goto xEoHw; 
      LEak1: 
      goto Z1wJH; 
      goto uTJA7; 
      ivJrm: 
      $isCached = $this->isCached($courrier["name"], $origin_id, $dest_id, $weight); 
      goto mUKeY; 
      uTJA7: 
      rF9dd: 
      goto g2_qV; 
      mUKeY: 
      if (!(!$isCached && !in_array($courrier["name"], $courriers))) { 
        goto DVOju; 
      } 
      goto u6cp7; 
      W_z06: 
    } 
    goto fF0Ll; 
    iporO: 
    $activeCouriers = array(); 
    goto fMSAV; 
    wEZod: 
    WNweS: 
    goto WGj2U; 
    XXnu3: 
    goto bP3yR; 
    goto Z25KE; 
    Zna87: 
    pf9L3: 
    goto XXnu3; 
    qb0ii: 
    bP3yR: 
    goto jcEMq; 
    GPywY: 
    $weight = $weight * 1000; 
    goto Zna87; 
    jcEMq: 
    if (!($weight == 0)) { 
      goto h2MU8; 
    } 
    goto rViz5; 
    WGj2U: 
    $activeCouriers = $this->getActiveCouriers(); 
    goto tmv9H; 
    n4Jo3: 
    if (!($unit == "kg")) { 
      goto pf9L3; 
    } 
    goto GPywY; 
    fF0Ll: 
    nt_2i: 
    goto DoBii; 
    fMSAV: 
    goto l1Nug; 
    goto wEZod; 
    tmv9H: 
    l1Nug: 
    goto YGTJK; 
    Z25KE: 
    nTX5Y: 
    goto rJQJt; 
    GD8l5: 
    h2MU8: 
    goto zRibE; 
    A53m1: 
    MJtJq: 
    goto LubN5; 
    f8fwj: 
    $this->cacheCourriers($courriers, $origin_id, $dest_id, $weight); 
    goto A53m1; 
    cnCqz: 
    $unit = $this->weight->getUnit($this->config->get("config_weight_class_id")); 
    goto vuVKv; 
    YGTJK: 
    $courriers = array(); 
    goto Xs09c; 
    rViz5: 
    $weight = 1; 
    goto GD8l5; 
    zRibE: 
    if ($this->config->get("module_bundle_setting_status")) { 
      goto WNweS; 
    } 
    goto iporO; 
    rJQJt: 
    $weight = $weight; 
    goto qb0ii; 
    z6Y_G: 
    $weight = $weight < 1 ? 1 : $weight; 
    goto cnCqz; 
    vuVKv: 
    if ($unit == "g") { 
      goto nTX5Y; 
    } 
    goto n4Jo3; 
    LubN5: 
  } 
  public function getCosts($origin_id, $dest_id, $weight, $type, $courrier) 
  { 
    goto JMSEd; 
    eoTg0: 
    $service = $this->translateServiceName($courrier, $type, $is_ctc); 
    goto qAD21; 
    g0KPs: 
    $is_ctc = $courrier == "JNE" ? strpos(json_encode($costs_data), "CTC") : 0; 
    goto eoTg0; 
    V7CdB: 
    Vkq7m: 
    goto KT6pI; 
    qAD21: 
    foreach ($costs_data as $cost_data) { 
      goto bzUlL; 
      Ubfn1: 
      $cost = $cost_data["cost"][0]; 
      goto oRm1w; 
      suntC: 
      qeibh: 
      goto zxHVh; 
      zxHVh: 
      OImPx: 
      goto QcWNB; 
      bzUlL: 
      if (!($cost_data["service"] == $service)) { 
        goto qeibh; 
      } 
      goto Ubfn1; 
      oRm1w: 
      return array("cost" => $cost["value"], "etd" => $cost["etd"]); 
      goto suntC; 
      QcWNB: 
    } 
    goto V7CdB; 
    KT6pI: 
    UXl5n: 
    goto YcpGN; 
    xE4F6: 
    if (!$this->isCached(strtolower($courrier), $origin_id, $dest_id, $weight)) { 
      goto UXl5n; 
    } 
    goto O5jDd; 
    e9FZw: 
    $cache = $this->getCache($cacheKey); 
    goto ZrZr_; 
    O5jDd: 
    $cacheKey = "hpwd." . strtolower($courrier) . "." . $origin_id . "." . $dest_id . "." . $weight; 
    goto e9FZw; 
    JMSEd: 
    $weight = $weight < 1000 ? 1000 : $weight; 
    goto xE4F6; 
    ZrZr_: 
    $costs_data = json_decode($cache, true); 
    goto g0KPs; 
    YcpGN: 
    return false; 
    goto aOddc; 
    aOddc: 
  } 
  public function getIC($origin_id, $dest_id, $weight, $type, $courrier) 
  { 
    goto Xs5XS; 
    b__uG: 
    $response = json_decode($costs_data, true); 
    goto IJDji; 
    jbTtY: 
    goto G3hWJ; 
    goto rue0Y; 
    R2m_L: 
    if ($type == "PBL") { 
      goto utDh2; 
    } 
    goto Q69Th; 
    i0FNW: 
    $ar_type[] = "PAKETPOS CEPAT LN"; 
    goto xRisx; 
    qbHjG: 
    goto VANz2; 
    goto OSNNB; 
    d_jI1: 
    foreach ($results["costs"] as $arr => $val) { 
      goto x3NgU; 
      Km38D: 
      L9VFa: 
      goto z5O4t; 
      aLoEv: 
      $costs = array("cost" => $val["cost"], "etd" => $val["etd"], "currency" => $val["currency"], "currency_value" => $currency); 
      goto Km38D; 
      z5O4t: 
      JSYfE: 
      goto WcEzr; 
      x3NgU: 
      if (!in_array($val["service"], $ar_type)) { 
        goto L9VFa; 
      } 
      goto aLoEv; 
      WcEzr: 
    } 
    goto pHKw5; 
    a0020: 
    if ($costs_data) { 
      goto X8TJw; 
    } 
    goto STaLb; 
    Srv39: 
    $err = curl_error($curl); 
    goto xaP57; 
    gFGj2: 
    curl_setopt_array($curl, array(CURLOPT_URL => "https://pro.rajaongkir.com/api/v2/internationalCost", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "origin=" . $origin_id . "&destination=" . $dest_id . "&weight=" . $weight . "&courier=" . strtolower($courrier) . '', CURLOPT_HTTPHEADER => array("content-type: application/x-www-form-urlencoded", "key:  1545d32c7ff9012f8eaf4b2b34e34424"))); 
    goto LXGgi; 
    Y2kgR: 
    return false; 
    goto Om0a3; 
    Om0a3: 
    v3v2f: 
    goto P7GJx; 
    ja_eu: 
    if ($courrier == "JNE") { 
      goto RvtPG; 
    } 
    goto S385E; 
    qIb01: 
    $ar_type[] = "Paket"; 
    goto iQKpm; 
    ESi0T: 
    if (!$err) { 
      goto v3v2f; 
    } 
    goto Y2kgR; 
    vMGub: 
    t7Rjx: 
    goto jbTtY; 
    iQKpm: 
    A0Mpr: 
    goto MdXtV; 
    p57Cl: 
    RvtPG: 
    goto erjUp; 
    tBh7D: 
    tpBJw: 
    goto d_jI1; 
    JRCMt: 
    if ($type == "PCL") { 
      goto cCYmc; 
    } 
    goto R2m_L; 
    rue0Y: 
    utDh2: 
    goto Jgu1I; 
    tZa_1: 
    $ar_type[] = "EMS BARANG"; 
    goto vMGub; 
    IrN1m: 
    G3hWJ: 
    goto Qt48s; 
    xRisx: 
    LAhf6: 
    goto aNI1I; 
    D_R6q: 
    $ar_type[] = "R LN"; 
    goto H7VWI; 
    Nf6WF: 
    $costs = array(); 
    goto b__uG; 
    erjUp: 
    $ar_type[] = "INTL"; 
    goto tBh7D; 
    lfhSk: 
    YGipQ: 
    goto a0020; 
    Jgu1I: 
    $ar_type[] = "PAKETPOS BIASA LN"; 
    goto IrN1m; 
    S385E: 
    if ($courrier == "POS") { 
      goto nVmFO; 
    } 
    goto vKUKB; 
    aNI1I: 
    SJRmB: 
    goto NVUBc; 
    Y62Fa: 
    $currency = $response["rajaongkir"]["currency"]["value"]; 
    goto UVmgk; 
    P7GJx: 
    X8TJw: 
    goto Nf6WF; 
    oO7Sn: 
    $key = $this->config->get("module_bundle_apitype") == "ownapi" ? $this->config->get("module_bundle_rajaongkirapi") : $this->config->get("hpwd_theq"); 
    goto ii8DZ; 
    Q69Th: 
    if ($type == "EMS") { 
      goto cKA2r; 
    } 
    goto oONwN; 
    wz4fW: 
    $costs_data = $this->getCache("hpwd.ISC." . $courrier . "." . $origin_id . "." . $dest_id . "." . $weight); 
    goto lfhSk; 
    xaP57: 
    curl_close($curl); 
    goto ESi0T; 
    oONwN: 
    if (!($type == "RLN")) { 
      goto lZPLG; 
    } 
    goto D_R6q; 
    sc5qj: 
    return $costs; 
    goto yJET1; 
    pHKw5: 
    tcwiQ: 
    goto sc5qj; 
    Qt48s: 
    goto LAhf6; 
    goto A8itf; 
    MdXtV: 
    goto SJRmB; 
    goto qfjeD; 
    Xs5XS: 
    $weight = $weight < 1000 ? 1000 : $weight; 
    goto oO7Sn; 
    vKUKB: 
    if (!($courrier == "TIKI")) { 
      goto A0Mpr; 
    } 
    goto qIb01; 
    QuX9m: 
    goto t7Rjx; 
    goto AE__j; 
    IJDji: 
    $results = $response["rajaongkir"]["results"]["0"]; 
    goto Y62Fa; 
    PduuK: 
    $ar_type = array(); 
    goto ja_eu; 
    yJET1: 
    VANz2: 
    goto V8tMQ; 
    H7VWI: 
    lZPLG: 
    goto QuX9m; 
    OSNNB: 
    YNGMY: 
    goto MxLs5; 
    AE__j: 
    cKA2r: 
    goto tZa_1; 
    STaLb: 
    $curl = curl_init(); 
    goto gFGj2; 
    ii8DZ: 
    $costs_data = array(); 
    goto yCTcK; 
    NVUBc: 
    goto tpBJw; 
    goto p57Cl; 
    MxLs5: 
    $this->setCache("hpwd.ISC." . $courrier . "." . $origin_id . "." . $dest_id . "." . $weight, $costs_data); 
    goto PduuK; 
    LXGgi: 
    $costs_data = curl_exec($curl); 
    goto Srv39; 
    huJe4: 
    return array(); 
    goto qbHjG; 
    yCTcK: 
    if (!($origin_id && $dest_id && $weight && $type && $courrier)) { 
      goto YGipQ; 
    } 
    goto wz4fW; 
    qfjeD: 
    nVmFO: 
    goto JRCMt; 
    UVmgk: 
    if ($response["rajaongkir"]["status"]["code"] == 200) { 
      goto YNGMY; 
    } 
    goto huJe4; 
    A8itf: 
    cCYmc: 
    goto i0FNW; 
    V8tMQ: 
  } 
  public function getDakotaCost($origin_id, $subdistrict_id, $weight) 
  { 
    goto qJstR; 
    NREiq: 
    $data["cost"] = $cost; 
    goto RUiVC; 
    T0wii: 
    curl_close($curl); 
    goto NASdy; 
    D4V5F: 
    curl_setopt_array($curl, array(CURLOPT_URL => "https://www.dakotacargo.co.id/api/dbs/price/?ak={$ak}&tpr={$tpr}&tko={$tko}&tke={$tkec}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET")); 
    goto DYaRy; 
    RUiVC: 
    goto vrowN; 
    goto D033h; 
    pzB90: 
    $tpr = urlencode($destination["provinsi"]); 
    goto SH14k; 
    c7ric: 
    OTKvQ: 
    goto xdoU9; 
    C3ahy: 
    $tkec = urlencode($destination["kecamatan"]); 
    goto Zdqez; 
    cLQz1: 
    msoZv: 
    goto ZekxH; 
    uFl1H: 
    $err = curl_error($curl); 
    goto T0wii; 
    SH14k: 
    $tko = urlencode($destination["kota"]); 
    goto C3ahy; 
    fSRb1: 
    $kgnext = (int) $result["price"][0]["kgnext"]; 
    goto vllOs; 
    Zdqez: 
    $curl = curl_init(); 
    goto D4V5F; 
    NASdy: 
    if ($err) { 
      goto msoZv; 
    } 
    goto B81Xl; 
    GSRGK: 
    vrowN: 
    goto eOq2x; 
    DYaRy: 
    $response = curl_exec($curl); 
    goto uFl1H; 
    kkQeE: 
    A6BWE: 
    goto J5JJ_; 
    Pf4ZL: 
    goto SIcz1; 
    goto cLQz1; 
    eOq2x: 
    $data["etd"] = $etd; 
    goto c7ric; 
    vllOs: 
    $etd = $result["price"][0]["estHari"]; 
    goto fqJCF; 
    B81Xl: 
    $result = json_decode($response, true); 
    goto mPsZ7; 
    ZekxH: 
    return false; 
    goto GlMK1; 
    Mla8y: 
    $destination = $this->db->query($sql_destination)->row; 
    goto sIIYA; 
    cigJT: 
    $sql_destination = "SELECT c.name as 'provinsi', z.name as 'kota', s.name as kecamatan FROM `hp_subdistrict` s INNER JOIN `" . DB_PREFIX . "zone` z ON s.city_id = z.zone_id INNER JOIN `" . DB_PREFIX . "country` c ON z.country_id = c.country_id where sub_district_id = " . (int) $subdistrict_id; 
    goto Mla8y; 
    mPsZ7: 
    if (is_array($result)) { 
      goto A6BWE; 
    } 
    goto wsNjW; 
    tj4m7: 
    $cost += $weight * $kgnext; 
    goto NREiq; 
    fqJCF: 
    $data = array(); 
    goto Ghp1b; 
    UzW5Q: 
    $sql_origin = "SELECT name FROM `" . DB_PREFIX . "zone` WHERE zone_id = " . (int) $origin_id; 
    goto Q71p7; 
    qJstR: 
    $weight = $weight / 1000; 
    goto UzW5Q; 
    BbamB: 
    $min = $result["price"][0]["minkg"]; 
    goto fSRb1; 
    udLNE: 
    $weight -= $min; 
    goto tj4m7; 
    Q71p7: 
    $origin = $this->db->query($sql_origin)->row; 
    goto cigJT; 
    sIIYA: 
    $ak = urlencode($origin["name"]); 
    goto pzB90; 
    GlMK1: 
    SIcz1: 
    goto FR1sH; 
    J5JJ_: 
    $cost = (int) $result["price"][0]["pokok"]; 
    goto BbamB; 
    wsNjW: 
    return array(); 
    goto Za9g5; 
    xdoU9: 
    return $data; 
    goto Pf4ZL; 
    Za9g5: 
    goto OTKvQ; 
    goto kkQeE; 
    sg5Nt: 
    $data["cost"] = $cost; 
    goto GSRGK; 
    Ghp1b: 
    if ($weight <= $min) { 
      goto nN14k; 
    } 
    goto udLNE; 
    D033h: 
    nN14k: 
    goto sg5Nt; 
    FR1sH: 
  } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php
/*
DO NOT EDIT!
Author          : HP Web Design
Website         : https://hpwebdesign.id
Support         : [email protected]
License Type    : Single Domain License
Licensing       : http://hpwebdesign.id/licensing
*/
class Shipping
{
  private $config;
  private $customer;
  private $session;
  private $db;
  private $cart;
  private $tax;
  private $weight;
  public function __construct($registry)
  {
    goto JaDxW;
    Mt28I:
    $this->cart = $registry->get("\143\x61\162\164");
    goto az6pE;
    kHNcJ:
    $this->tax = $registry->get("\x74\x61\x78");
    goto JF155;
    nzSZk:
    $this->customer = $registry->get("\143\165\163\164\157\155\x65\x72");
    goto Yaspp;
    Yaspp:
    $this->session = $registry->get("\x73\x65\x73\x73\x69\x6f\x6e");
    goto V2K9M;
    V2K9M:
    $this->db = $registry->get("\144\142");
    goto kHNcJ;
    JaDxW:
    $this->config = $registry->get("\143\x6f\x6e\x66\x69\147");
    goto nzSZk;
    JF155:
    $this->weight = $registry->get("\x77\x65\x69\x67\x68\164");
    goto Mt28I;
    az6pE:
  }
  protected function translateServiceName($courierName, $serviceName, $is_ctc = null)
  {
    goto qI3CN;
    GK51s:
    kcqpS:
    goto oaVJ1;
    PGkpq:
    if ($is_ctc) {
      goto BxEau;
    }
    goto fLq2y;
    LbZDB:
    BxEau:
    goto vEXqU;
    fLq2y:
    $jne_service = array("\x52\105\107" => "\x52\x45\107", "\x59\x45\123" => "\x59\105\123");
    goto wbPMi;
    qI3CN:
    $courierName = strtolower($courierName);
    goto eJ6RC;
    bSf87:
    goto kcqpS;
    goto n7LXS;
    CKQuR:
    return $serviceName;
    goto bSf87;
    L7SjF:
    if (isset($data[$courierName][$serviceName])) {
      goto SLR_3;
    }
    goto CKQuR;
    wbPMi:
    goto xJnPC;
    goto LbZDB;
    n7LXS:
    SLR_3:
    goto AyHG2;
    vEXqU:
    $jne_service = array("\122\105\107" => "\103\124\x43", "\131\x45\123" => "\x43\124\103\x59\105\x53");
    goto S1xcW;
    AyHG2:
    return $data[$courierName][$serviceName];
    goto GK51s;
    S1xcW:
    xJnPC:
    goto EDVr6;
    eJ6RC:
    $serviceName = $serviceName;
    goto PGkpq;
    EDVr6:
    $data = array("\x6a\156\145" => $jne_service, "\x70\x6f\163" => array("\120\101\x4b\105\x54\113\111\x4c\x41\124" => "\120\141\x6b\145\x74\40\113\151\154\141\x74\x20\x4b\150\165\163\x75\x73", "\113\111\114\101\124" => "\x53\165\x72\x61\x74\x20\x4b\151\x6c\141\164\x20\x4b\150\x75\x73\165\163", "\105\130\120\122\x45\123\x53" => "\x45\x78\x70\162\x65\163\163\x20\116\145\x78\x74\x20\x44\141\x79\x20\x42\141\x72\x61\156\x67", "\102\111\101\x53\101" => "\120\141\153\145\x74\x70\x6f\163\x20\102\151\141\x73\141"), "\x69\144\x6c" => array("\111\x52\x45\107" => "\151\122\105\107"));
    goto L7SjF;
    oaVJ1:
  }
  protected function getCache($key)
  {
    $cache = new \Cache("\146\151\x6c\145");
    return $cache->get($key);
  }
  protected function setCache($key, $value)
  {
    $cache = new \Cache("\x66\x69\154\x65");
    return $cache->set($key, $value);
  }
  protected function getActiveCouriers()
  {
    goto xXAf9;
    cIAt_:
    foreach ($activeCourriers as $courier) {
      goto xHe4J;
      ucEyR:
      $courriers[] = array("\156\141\155\145" => strtolower($courierPart[0]), "\163\145\x72\166\151\143\x65" => strtoupper($courierPart[1]));
      goto eftDb;
      xHe4J:
      $courierPart = explode("\x5f", $courier);
      goto ucEyR;
      eftDb:
      PSaf3:
      goto Ib8Ff;
      Ib8Ff:
    }
    goto rAk6Y;
    rAk6Y:
    ACiKA:
    goto XcnaS;
    Sg4jk:
    KTy8b:
    goto cIAt_;
    UHEcL:
    return array();
    goto uLKJj;
    DrHFW:
    $courriers = array();
    goto EDLw0;
    XcnaS:
    return $courriers;
    goto GYC4K;
    xXAf9:
    $activeCourriers = $this->config->get("\155\157\144\x75\x6c\145\137\142\x75\x6e\144\154\x65\137\x70\162\145\x66\x65\162\x72\x65\x64\x5f\x73\x68\x69\x70\x70\151\x6e\x67");
    goto DrHFW;
    GYC4K:
    TYNfB:
    goto M2Z6M;
    uLKJj:
    goto TYNfB;
    goto Sg4jk;
    EDLw0:
    if ($activeCourriers) {
      goto KTy8b;
    }
    goto UHEcL;
    M2Z6M:
  }
  protected function isCached($courrier, $origin_id, $dest_id, $weight)
  {
    goto sISzu;
    sISzu:
    $cacheKey = "\150\160\167\x64\x2e" . $courrier . "\x2e" . $origin_id . "\x2e" . $dest_id . "\x2e" . $weight;
    goto lfi4Y;
    lfi4Y:
    $cache = $this->getCache($cacheKey);
    goto mXM14;
    mXM14:
    return $cache ? true : false;
    goto zUMDZ;
    zUMDZ:
  }
  protected function cacheCourriers($courriers, $origin_id, $dest_id, $weight)
  {
    goto NMitl;
    my6rE:
    curl_setopt_array($curl, array(CURLOPT_URL => "\150\x74\164\160\x3a\57\x2f\160\x72\x6f\56\x72\141\x6a\141\157\x6e\147\153\x69\x72\x2e\x63\x6f\155\57\141\160\x69\x2f\x63\x6f\163\164", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x50\117\123\x54", CURLOPT_POSTFIELDS => http_build_query($requestBody), CURLOPT_HTTPHEADER => array("\x63\157\156\164\145\x6e\164\x2d\164\171\160\145\72\x20\x61\x70\x70\x6c\x69\x63\141\164\x69\157\156\x2f\x78\55\x77\x77\x77\55\x66\x6f\162\155\x2d\165\x72\154\145\x6e\143\x6f\144\145\x64", "\153\x65\x79\x3a\x20 1545d32c7ff9012f8eaf4b2b34e34424")));
    goto esCSN;
    OYC1O:
    if (!($response["\x72\x61\x6a\x61\x6f\x6e\147\153\x69\162"]["\x73\164\141\x74\x75\163"]["\x63\157\x64\x65"] == 200)) {
      goto TZ1d5;
    }
    goto vneQq;
    MrbZA:
    foreach ($results as $result) {
      goto WNPmR;
      gMF45:
      goto PJ2ib;
      goto Th16w;
      tpAqu:
      PJ2ib:
      goto wwRYb;
      Th16w:
      BLJs1:
      goto q8VLu;
      wwRYb:
      $this->setCache("\x68\x70\167\144\56" . strtolower($courrierName) . "\56" . $origin_id . "\56" . $dest_id . "\56" . $weight, json_encode($result["\143\157\x73\x74\163"]));
      goto njTHi;
      v1shM:
      $courrierName = $result["\143\x6f\x64\145"];
      goto gMF45;
      njTHi:
      QD0me:
      goto a3Oje;
      q8VLu:
      $courrierName = "\152\x6e\164";
      goto tpAqu;
      WNPmR:
      if ($result["\143\x6f\x64\x65"] == "\112\46\124") {
        goto BLJs1;
      }
      goto v1shM;
      a3Oje:
    }
    goto JnYfw;
    YCa0j:
    return;
    goto Uf7df;
    YMc8O:
    if ($err) {
      goto NZNID;
    }
    goto jWblL;
    RyeNK:
    $results = array();
    goto OYC1O;
    lJvFg:
    $requestBody = array("\x6f\162\x69\x67\151\156" => $origin_id, "\x6f\x72\x69\x67\x69\156\124\x79\x70\145" => $originType, "\144\145\x73\x74\x69\156\141\164\x69\x6f\x6e" => $dest_id, "\144\x65\x73\164\x69\x6e\141\x74\151\x6f\156\x54\x79\x70\x65" => "\163\x75\142\x64\x69\x73\164\162\x69\143\164", "\167\145\x69\x67\150\x74" => $weight, "\143\x6f\x75\162\x69\x65\162" => strtolower(implode("\x3a", $courriers)));
    goto my6rE;
    V5UbX:
    curl_close($curl);
    goto YMc8O;
    Uf7df:
    wPT6u:
    goto pmnqj;
    esCSN:
    $res = curl_exec($curl);
    goto f0CI5;
    JnYfw:
    td9nL:
    goto BT5K5;
    podSj:
    NZNID:
    goto YCa0j;
    uTxek:
    $key = $this->config->get("\155\157\144\x75\154\x65\x5f\142\x75\x6e\x64\154\145\x5f\141\160\x69\x74\x79\x70\145") == "\x6f\x77\x6e\141\160\151" ? $this->config->get("\x6d\157\x64\x75\154\145\137\x62\x75\156\x64\x6c\x65\137\162\x61\152\141\157\156\147\153\151\162\x61\x70\x69") : $this->config->get("\150\x70\x77\144\x5f\x74\x68\x65\x71");
    goto j0XY_;
    BT5K5:
    goto wPT6u;
    goto podSj;
    SQ2ND:
    TZ1d5:
    goto MrbZA;
    vneQq:
    $results = $response["\x72\x61\152\x61\157\156\147\153\x69\162"]["\x72\145\x73\165\x6c\x74\x73"];
    goto SQ2ND;
    f0CI5:
    $err = curl_error($curl);
    goto V5UbX;
    j0XY_:
    $originType = "\x63\x69\x74\171";
    goto KtRM0;
    jWblL:
    $response = json_decode($res, true);
    goto RyeNK;
    NMitl:
    $weight = $weight >= 1000 ? $weight : 1000;
    goto uTxek;
    KtRM0:
    $curl = curl_init();
    goto lJvFg;
    pmnqj:
  }
  public function getAllCourriersCost($origin_id, $dest_id)
  {
    goto CBUJQ;
    CBUJQ:
    $weight = $this->cart->getWeight();
    goto z6Y_G;
    DoBii:
    if (empty($courriers)) {
      goto MJtJq;
    }
    goto f8fwj;
    Xs09c:
    foreach ($activeCouriers as $courrier) {
      goto ivJrm;
      u6cp7:
      if (!($courrier["\x6e\x61\x6d\x65"] == "\144\141\x6b\157\x74\x61")) {
        goto rF9dd;
      }
      goto LEak1;
      BRJ8B:
      Z1wJH:
      goto W_z06;
      xEoHw:
      DVOju:
      goto BRJ8B;
      g2_qV:
      $courriers[] = $courrier["\156\141\155\145"];
      goto xEoHw;
      LEak1:
      goto Z1wJH;
      goto uTJA7;
      ivJrm:
      $isCached = $this->isCached($courrier["\156\x61\155\145"], $origin_id, $dest_id, $weight);
      goto mUKeY;
      uTJA7:
      rF9dd:
      goto g2_qV;
      mUKeY:
      if (!(!$isCached && !in_array($courrier["\156\141\155\x65"], $courriers))) {
        goto DVOju;
      }
      goto u6cp7;
      W_z06:
    }
    goto fF0Ll;
    iporO:
    $activeCouriers = array();
    goto fMSAV;
    wEZod:
    WNweS:
    goto WGj2U;
    XXnu3:
    goto bP3yR;
    goto Z25KE;
    Zna87:
    pf9L3:
    goto XXnu3;
    qb0ii:
    bP3yR:
    goto jcEMq;
    GPywY:
    $weight = $weight * 1000;
    goto Zna87;
    jcEMq:
    if (!($weight == 0)) {
      goto h2MU8;
    }
    goto rViz5;
    WGj2U:
    $activeCouriers = $this->getActiveCouriers();
    goto tmv9H;
    n4Jo3:
    if (!($unit == "\x6b\147")) {
      goto pf9L3;
    }
    goto GPywY;
    fF0Ll:
    nt_2i:
    goto DoBii;
    fMSAV:
    goto l1Nug;
    goto wEZod;
    tmv9H:
    l1Nug:
    goto YGTJK;
    Z25KE:
    nTX5Y:
    goto rJQJt;
    GD8l5:
    h2MU8:
    goto zRibE;
    A53m1:
    MJtJq:
    goto LubN5;
    f8fwj:
    $this->cacheCourriers($courriers, $origin_id, $dest_id, $weight);
    goto A53m1;
    cnCqz:
    $unit = $this->weight->getUnit($this->config->get("\143\157\156\146\151\x67\x5f\x77\145\151\147\150\x74\137\x63\154\x61\x73\x73\x5f\151\144"));
    goto vuVKv;
    YGTJK:
    $courriers = array();
    goto Xs09c;
    rViz5:
    $weight = 1;
    goto GD8l5;
    zRibE:
    if ($this->config->get("\x6d\x6f\x64\x75\x6c\145\137\142\165\x6e\144\154\145\137\x73\x65\x74\x74\151\156\147\x5f\x73\164\141\164\x75\x73")) {
      goto WNweS;
    }
    goto iporO;
    rJQJt:
    $weight = $weight;
    goto qb0ii;
    z6Y_G:
    $weight = $weight < 1 ? 1 : $weight;
    goto cnCqz;
    vuVKv:
    if ($unit == "\x67") {
      goto nTX5Y;
    }
    goto n4Jo3;
    LubN5:
  }
  public function getCosts($origin_id, $dest_id, $weight, $type, $courrier)
  {
    goto JMSEd;
    eoTg0:
    $service = $this->translateServiceName($courrier, $type, $is_ctc);
    goto qAD21;
    g0KPs:
    $is_ctc = $courrier == "\x4a\x4e\105" ? strpos(json_encode($costs_data), "\103\124\x43") : 0;
    goto eoTg0;
    V7CdB:
    Vkq7m:
    goto KT6pI;
    qAD21:
    foreach ($costs_data as $cost_data) {
      goto bzUlL;
      Ubfn1:
      $cost = $cost_data["\x63\157\163\164"][0];
      goto oRm1w;
      suntC:
      qeibh:
      goto zxHVh;
      zxHVh:
      OImPx:
      goto QcWNB;
      bzUlL:
      if (!($cost_data["\x73\x65\x72\x76\x69\143\x65"] == $service)) {
        goto qeibh;
      }
      goto Ubfn1;
      oRm1w:
      return array("\x63\157\x73\164" => $cost["\166\x61\x6c\x75\x65"], "\145\164\144" => $cost["\145\x74\144"]);
      goto suntC;
      QcWNB:
    }
    goto V7CdB;
    KT6pI:
    UXl5n:
    goto YcpGN;
    xE4F6:
    if (!$this->isCached(strtolower($courrier), $origin_id, $dest_id, $weight)) {
      goto UXl5n;
    }
    goto O5jDd;
    e9FZw:
    $cache = $this->getCache($cacheKey);
    goto ZrZr_;
    O5jDd:
    $cacheKey = "\150\x70\167\x64\x2e" . strtolower($courrier) . "\x2e" . $origin_id . "\56" . $dest_id . "\56" . $weight;
    goto e9FZw;
    JMSEd:
    $weight = $weight < 1000 ? 1000 : $weight;
    goto xE4F6;
    ZrZr_:
    $costs_data = json_decode($cache, true);
    goto g0KPs;
    YcpGN:
    return false;
    goto aOddc;
    aOddc:
  }
  public function getIC($origin_id, $dest_id, $weight, $type, $courrier)
  {
    goto Xs5XS;
    b__uG:
    $response = json_decode($costs_data, true);
    goto IJDji;
    jbTtY:
    goto G3hWJ;
    goto rue0Y;
    R2m_L:
    if ($type == "\x50\x42\x4c") {
      goto utDh2;
    }
    goto Q69Th;
    i0FNW:
    $ar_type[] = "\120\x41\113\105\124\x50\117\x53\40\x43\x45\x50\101\124\x20\114\x4e";
    goto xRisx;
    qbHjG:
    goto VANz2;
    goto OSNNB;
    d_jI1:
    foreach ($results["\x63\x6f\x73\164\163"] as $arr => $val) {
      goto x3NgU;
      Km38D:
      L9VFa:
      goto z5O4t;
      aLoEv:
      $costs = array("\x63\157\x73\x74" => $val["\x63\157\x73\164"], "\145\164\x64" => $val["\x65\164\144"], "\x63\x75\162\162\145\x6e\x63\171" => $val["\143\165\x72\x72\145\156\143\171"], "\x63\x75\x72\x72\145\x6e\143\171\x5f\166\141\154\x75\x65" => $currency);
      goto Km38D;
      z5O4t:
      JSYfE:
      goto WcEzr;
      x3NgU:
      if (!in_array($val["\163\145\162\166\151\x63\145"], $ar_type)) {
        goto L9VFa;
      }
      goto aLoEv;
      WcEzr:
    }
    goto pHKw5;
    a0020:
    if ($costs_data) {
      goto X8TJw;
    }
    goto STaLb;
    Srv39:
    $err = curl_error($curl);
    goto xaP57;
    gFGj2:
    curl_setopt_array($curl, array(CURLOPT_URL => "\x68\164\x74\160\163\72\57\x2f\160\x72\x6f\56\162\141\152\x61\x6f\156\147\153\x69\162\x2e\143\157\x6d\x2f\141\x70\x69\57\x76\62\x2f\x69\x6e\x74\145\x72\x6e\141\x74\x69\x6f\x6e\141\x6c\103\x6f\x73\164", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\x53\x54", CURLOPT_POSTFIELDS => "\x6f\162\x69\x67\x69\x6e\x3d" . $origin_id . "\46\x64\x65\x73\x74\x69\x6e\x61\164\x69\x6f\156\75" . $dest_id . "\x26\x77\x65\x69\x67\150\x74\x3d" . $weight . "\46\x63\157\165\x72\151\x65\x72\x3d" . strtolower($courrier) . '', CURLOPT_HTTPHEADER => array("\143\x6f\x6e\164\145\x6e\164\x2d\164\171\x70\x65\72\x20\141\160\160\x6c\x69\x63\x61\x74\x69\157\x6e\57\170\x2d\x77\x77\x77\55\146\x6f\x72\x6d\x2d\x75\x72\154\145\156\x63\157\x64\145\144", "\x6b\x65\171\72\x20 1545d32c7ff9012f8eaf4b2b34e34424")));
    goto LXGgi;
    Y2kgR:
    return false;
    goto Om0a3;
    Om0a3:
    v3v2f:
    goto P7GJx;
    ja_eu:
    if ($courrier == "\112\x4e\x45") {
      goto RvtPG;
    }
    goto S385E;
    qIb01:
    $ar_type[] = "\x50\141\x6b\x65\164";
    goto iQKpm;
    ESi0T:
    if (!$err) {
      goto v3v2f;
    }
    goto Y2kgR;
    vMGub:
    t7Rjx:
    goto jbTtY;
    iQKpm:
    A0Mpr:
    goto MdXtV;
    p57Cl:
    RvtPG:
    goto erjUp;
    tBh7D:
    tpBJw:
    goto d_jI1;
    JRCMt:
    if ($type == "\x50\103\x4c") {
      goto cCYmc;
    }
    goto R2m_L;
    rue0Y:
    utDh2:
    goto Jgu1I;
    tZa_1:
    $ar_type[] = "\105\115\x53\40\102\101\122\x41\116\107";
    goto vMGub;
    IrN1m:
    G3hWJ:
    goto Qt48s;
    xRisx:
    LAhf6:
    goto aNI1I;
    D_R6q:
    $ar_type[] = "\x52\40\114\x4e";
    goto H7VWI;
    Nf6WF:
    $costs = array();
    goto b__uG;
    erjUp:
    $ar_type[] = "\x49\x4e\124\x4c";
    goto tBh7D;
    lfhSk:
    YGipQ:
    goto a0020;
    Jgu1I:
    $ar_type[] = "\120\x41\113\x45\x54\120\x4f\x53\x20\x42\x49\101\123\x41\40\x4c\x4e";
    goto IrN1m;
    S385E:
    if ($courrier == "\120\117\123") {
      goto nVmFO;
    }
    goto vKUKB;
    aNI1I:
    SJRmB:
    goto NVUBc;
    Y62Fa:
    $currency = $response["\x72\141\152\141\x6f\x6e\147\x6b\x69\x72"]["\x63\165\162\x72\145\x6e\143\x79"]["\166\141\x6c\x75\x65"];
    goto UVmgk;
    P7GJx:
    X8TJw:
    goto Nf6WF;
    oO7Sn:
    $key = $this->config->get("\x6d\x6f\x64\x75\x6c\x65\x5f\142\x75\156\144\154\145\x5f\141\160\x69\164\x79\x70\x65") == "\x6f\x77\x6e\x61\160\151" ? $this->config->get("\155\157\144\x75\x6c\145\x5f\x62\165\156\144\154\x65\x5f\x72\x61\152\x61\x6f\156\x67\153\151\x72\x61\160\x69") : $this->config->get("\150\160\x77\x64\137\x74\150\x65\161");
    goto ii8DZ;
    Q69Th:
    if ($type == "\105\115\x53") {
      goto cKA2r;
    }
    goto oONwN;
    wz4fW:
    $costs_data = $this->getCache("\150\160\167\144\x2e\111\123\103\56" . $courrier . "\x2e" . $origin_id . "\56" . $dest_id . "\x2e" . $weight);
    goto lfhSk;
    xaP57:
    curl_close($curl);
    goto ESi0T;
    oONwN:
    if (!($type == "\x52\x4c\116")) {
      goto lZPLG;
    }
    goto D_R6q;
    sc5qj:
    return $costs;
    goto yJET1;
    pHKw5:
    tcwiQ:
    goto sc5qj;
    Qt48s:
    goto LAhf6;
    goto A8itf;
    MdXtV:
    goto SJRmB;
    goto qfjeD;
    Xs5XS:
    $weight = $weight < 1000 ? 1000 : $weight;
    goto oO7Sn;
    vKUKB:
    if (!($courrier == "\x54\x49\x4b\111")) {
      goto A0Mpr;
    }
    goto qIb01;
    QuX9m:
    goto t7Rjx;
    goto AE__j;
    IJDji:
    $results = $response["\162\x61\152\x61\x6f\156\147\153\151\x72"]["\x72\x65\163\x75\x6c\x74\163"]["\x30"];
    goto Y62Fa;
    PduuK:
    $ar_type = array();
    goto ja_eu;
    yJET1:
    VANz2:
    goto V8tMQ;
    H7VWI:
    lZPLG:
    goto QuX9m;
    OSNNB:
    YNGMY:
    goto MxLs5;
    AE__j:
    cKA2r:
    goto tZa_1;
    STaLb:
    $curl = curl_init();
    goto gFGj2;
    ii8DZ:
    $costs_data = array();
    goto yCTcK;
    NVUBc:
    goto tpBJw;
    goto p57Cl;
    MxLs5:
    $this->setCache("\150\x70\x77\x64\56\x49\123\103\56" . $courrier . "\56" . $origin_id . "\56" . $dest_id . "\x2e" . $weight, $costs_data);
    goto PduuK;
    LXGgi:
    $costs_data = curl_exec($curl);
    goto Srv39;
    huJe4:
    return array();
    goto qbHjG;
    yCTcK:
    if (!($origin_id && $dest_id && $weight && $type && $courrier)) {
      goto YGipQ;
    }
    goto wz4fW;
    qfjeD:
    nVmFO:
    goto JRCMt;
    UVmgk:
    if ($response["\162\141\152\x61\x6f\x6e\x67\x6b\x69\x72"]["\163\x74\x61\164\165\x73"]["\143\x6f\x64\145"] == 200) {
      goto YNGMY;
    }
    goto huJe4;
    A8itf:
    cCYmc:
    goto i0FNW;
    V8tMQ:
  }
  public function getDakotaCost($origin_id, $subdistrict_id, $weight)
  {
    goto qJstR;
    NREiq:
    $data["\x63\157\163\164"] = $cost;
    goto RUiVC;
    T0wii:
    curl_close($curl);
    goto NASdy;
    D4V5F:
    curl_setopt_array($curl, array(CURLOPT_URL => "\x68\x74\x74\x70\163\72\57\57\167\x77\x77\x2e\x64\141\x6b\x6f\x74\x61\143\141\x72\x67\157\56\x63\x6f\x2e\151\144\x2f\x61\160\x69\x2f\144\142\x73\57\x70\x72\151\x63\145\x2f\x3f\141\x6b\x3d{$ak}\46\164\x70\x72\x3d{$tpr}\46\x74\153\x6f\75{$tko}\x26\164\x6b\145\75{$tkec}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x47\x45\x54"));
    goto DYaRy;
    RUiVC:
    goto vrowN;
    goto D033h;
    pzB90:
    $tpr = urlencode($destination["\160\x72\157\166\x69\x6e\163\151"]);
    goto SH14k;
    c7ric:
    OTKvQ:
    goto xdoU9;
    C3ahy:
    $tkec = urlencode($destination["\153\145\x63\141\155\141\x74\x61\156"]);
    goto Zdqez;
    cLQz1:
    msoZv:
    goto ZekxH;
    uFl1H:
    $err = curl_error($curl);
    goto T0wii;
    SH14k:
    $tko = urlencode($destination["\x6b\157\164\141"]);
    goto C3ahy;
    fSRb1:
    $kgnext = (int) $result["\160\x72\x69\x63\145"][0]["\153\147\156\x65\x78\164"];
    goto vllOs;
    Zdqez:
    $curl = curl_init();
    goto D4V5F;
    NASdy:
    if ($err) {
      goto msoZv;
    }
    goto B81Xl;
    GSRGK:
    vrowN:
    goto eOq2x;
    DYaRy:
    $response = curl_exec($curl);
    goto uFl1H;
    kkQeE:
    A6BWE:
    goto J5JJ_;
    Pf4ZL:
    goto SIcz1;
    goto cLQz1;
    eOq2x:
    $data["\x65\x74\144"] = $etd;
    goto c7ric;
    vllOs:
    $etd = $result["\x70\162\x69\x63\x65"][0]["\145\163\164\x48\141\162\x69"];
    goto fqJCF;
    B81Xl:
    $result = json_decode($response, true);
    goto mPsZ7;
    ZekxH:
    return false;
    goto GlMK1;
    Mla8y:
    $destination = $this->db->query($sql_destination)->row;
    goto sIIYA;
    cigJT:
    $sql_destination = "\x53\105\x4c\x45\x43\x54\x20\x63\56\x6e\x61\155\145\40\141\x73\40\x27\160\x72\157\166\x69\156\163\x69\x27\x2c\x20\172\56\156\x61\x6d\145\40\x61\x73\40\x27\153\157\x74\x61\x27\54\40\163\x2e\x6e\141\x6d\145\40\141\163\x20\x6b\145\143\x61\x6d\x61\x74\x61\x6e\40\x46\x52\x4f\x4d\x20\140\150\x70\x5f\x73\x75\x62\144\151\163\164\162\x69\x63\164\140\x20\x73\40\111\x4e\116\105\x52\x20\112\x4f\x49\116\40\x60" . DB_PREFIX . "\x7a\157\x6e\x65\x60\40\x7a\x20\117\x4e\40\163\x2e\x63\x69\164\x79\137\x69\144\x20\75\x20\x7a\x2e\172\x6f\156\145\137\x69\144\x20\x49\116\x4e\x45\x52\40\112\117\111\x4e\x20\140" . DB_PREFIX . "\143\157\165\156\164\x72\171\x60\x20\x63\40\x4f\x4e\x20\x7a\56\x63\x6f\x75\156\x74\x72\171\x5f\151\x64\x20\x3d\x20\x63\56\x63\x6f\165\156\x74\x72\171\x5f\151\x64\40\x77\x68\x65\162\145\40\x73\165\x62\x5f\x64\151\163\x74\x72\151\143\x74\137\151\144\x20\75\40" . (int) $subdistrict_id;
    goto Mla8y;
    mPsZ7:
    if (is_array($result)) {
      goto A6BWE;
    }
    goto wsNjW;
    tj4m7:
    $cost += $weight * $kgnext;
    goto NREiq;
    fqJCF:
    $data = array();
    goto Ghp1b;
    UzW5Q:
    $sql_origin = "\x53\105\114\105\x43\124\x20\156\x61\x6d\145\40\106\x52\x4f\115\40\140" . DB_PREFIX . "\x7a\x6f\x6e\145\140\40\x57\x48\105\122\105\x20\172\157\x6e\x65\137\151\x64\x20\x3d\x20" . (int) $origin_id;
    goto Q71p7;
    qJstR:
    $weight = $weight / 1000;
    goto UzW5Q;
    BbamB:
    $min = $result["\x70\x72\151\x63\145"][0]["\155\x69\156\x6b\x67"];
    goto fSRb1;
    udLNE:
    $weight -= $min;
    goto tj4m7;
    Q71p7:
    $origin = $this->db->query($sql_origin)->row;
    goto cigJT;
    sIIYA:
    $ak = urlencode($origin["\156\x61\155\145"]);
    goto pzB90;
    GlMK1:
    SIcz1:
    goto FR1sH;
    J5JJ_:
    $cost = (int) $result["\x70\x72\151\143\145"][0]["\x70\157\x6b\157\153"];
    goto BbamB;
    wsNjW:
    return array();
    goto Za9g5;
    xdoU9:
    return $data;
    goto Pf4ZL;
    Za9g5:
    goto OTKvQ;
    goto kkQeE;
    sg5Nt:
    $data["\x63\157\x73\164"] = $cost;
    goto GSRGK;
    Ghp1b:
    if ($weight <= $min) {
      goto nN14k;
    }
    goto udLNE;
    D033h:
    nN14k:
    goto sg5Nt;
    FR1sH:
  }
}

Function Calls

None

Variables

None

Stats

MD5 481330903045ef434a635ccc997c94c1
Eval Count 0
Decode Time 71 ms