Skip to content

Commit 356afa4

Browse files
Merge pull request #84 from Segtel1/master
reverted round function back to ceil to format amount
2 parents 8dcc21c + b2be70d commit 356afa4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

public/class-paystack-forms-public.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@ public function add_for_kobo($amountinkobo)
137137
if ($amountinkobo > $this->flatline) {
138138
return $amountinkobo + $this->cap;
139139
} elseif ($amountinkobo > $this->crossover) {
140-
return round((($amountinkobo + $this->additional_charge) / $this->charge_divider),2);
140+
return ceil(($amountinkobo + $this->additional_charge) / $this->charge_divider);
141141
} else {
142-
return round(($amountinkobo / $this->charge_divider),2);
142+
return ceil($amountinkobo / $this->charge_divider);
143143
}
144144
}
145145

146146
public function add_for_ngn($amountinngn)
147147
{
148-
return $this->add_for_kobo(round(($amountinngn * 100),2)) / 100;
148+
return $this->add_for_kobo(ceil($amountinngn * 100)) / 100;
149149
}
150150
}
151151

0 commit comments

Comments
 (0)