diff --git a/src/API.php b/src/API.php index 364ce27..00ac1d7 100644 --- a/src/API.php +++ b/src/API.php @@ -101,9 +101,7 @@ public function getParcelNumbers($parcel_data) { // validate parcel data $this->validateParcelPrepare($parcel); - $parcel['CodCurr'] = $parcel['CodCurr'] ?? 'HUF'; - // the smallest fraction is 5 for COD amount - $parcel['CodAmount'] = round((float)$parcel['CodAmount'] / 5, 0) * 5; + $parcel['CodCurr'] = $parcel['CodCurr'] ?? 'HUF'; $data .= "config["client_number"] . "\" ExpSenderID=\"\" PickupDate=\"" . (isset($parcel["PickupDate"]) ? date(DATE_ATOM, strtotime($parcel["PickupDate"])) : date(DATE_ATOM)) . "\" ClientRef=\"" . $parcel['ClientRef'] . "\" CODAmount=\"" . $parcel['CodAmount'] . "\" CODCurr=\"" . $parcel['CodCurr'] . "\" CODRef=\"" . $parcel['CodRef'] . "\" PCount=\"" . (isset($parcel["Pcount"]) ? $parcel["Pcount"] : "1") . "\" Info=\"".(isset($parcel['ConsigComment']) ? $parcel['ConsigComment'] : "" ) . "\">"; $data .= ""; $data .= ""; @@ -421,4 +419,4 @@ private function validateParcelPrepare ($data) { echo $exception->getFullMessage(); } } -} \ No newline at end of file +}