I'm implementing Ckeckout Cielo, and numeric values are always returned for prices.
Monetary values are always treated as integer values, without representation of decimal places, with the last two digits being regarded as the cents.
Exemplo: R$ 1.286,87 é representado como 128687 e R$ 1,00 é representado como 100
I'm thinking of using the substr_replace
function to add (.)
before the last two houses, as in the example below:
substr_replace(100000, '.', -2,0) = 1000.00
substr_replace(100, '.', -2,0) = 1.00
In this context, would it apply to substr_replace
for writing decimal values in the Mysql
database would be suitable for any money value from heaven?