Skip to content

Commit

Permalink
KESZPENZEUR is handled just like KESZPENZHUF at rounding
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamás KIRÁLY committed Aug 28, 2023
1 parent 9a92479 commit 0e70692
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Models/NTAKPayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ public function buildRequest(): array
$rounded = 0;
$request = [
'fizetesiMod' => $this->paymentType->name,
'fizetettOsszegHUF' => $this->paymentType !== NTAKPaymentType::KESZPENZHUF
'fizetettOsszegHUF' => ! in_array($this->paymentType, [NTAKPaymentType::KESZPENZHUF, NTAKPaymentType::KESZPENZEUR])
? $this->total
: $rounded = (int) round($this->total / 5) * 5
: $rounded = (int) (round($this->total / 5) * 5)
];

if ($this->paymentType === NTAKPaymentType::KESZPENZHUF) {
if (in_array($this->paymentType, [
NTAKPaymentType::KESZPENZHUF, NTAKPaymentType::KESZPENZEUR
])) {
$this->round = $this->total - $rounded;
}

Expand Down

0 comments on commit 0e70692

Please sign in to comment.