Input string is not a valid integer
-
Ocorre em alguns valores do checkout, como exemplo com total de 140.55.
“errors”: {
“order.items[0].amount”: [
“Input string ‘14055.000000000002’ is not a valid integer. Path ‘items[0].amount’, line 1, position 73.”,
“The field amount must be greater than or equal to 1”
]
},O problema está no arquivo PagarmeApiV5.php linha 38.
‘amount’ => $order->get_total() * 100,
Pode ser resolvido convertendo a string para integer:
‘amount’ => (int)$order->get_total() * 100,
Espero ter ajudado.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Input string is not a valid integer’ is closed to new replies.