You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/app/Services/Payment/PaymentAmount.php

15 lines
261 B
PHP

<?php
namespace App\Services\Payment;
class PaymentAmount
{
public static function normalize($value)
{
if (!is_numeric($value)) {
return '0.00';
}
return number_format(round((float) $value, 2), 2, '.', '');
}
}