The GpEcomAuthorizationRequestBuilder class always formats the amount to two decimal places, but this format depends on the currency. For example the CLP currency has no decimal places.
|
$amount = $xml->createElement("amount", preg_replace('/[^0-9]/', '', sprintf('%01.2f', $builder->amount))); |