amount value should be a string when send to the api

This commit is contained in:
David Remer 2020-10-22 09:02:25 +03:00
parent 9dc95c0e28
commit 5de7c081f2

View file

@ -74,7 +74,7 @@ class Amount {
public function to_array(): array {
$amount = array(
'currency_code' => $this->currency_code(),
'value' => $this->value(),
'value' => number_format( $this->value(), 2 ),
);
if ( $this->breakdown() && count( $this->breakdown()->to_array() ) ) {
$amount['breakdown'] = $this->breakdown()->to_array();