From 5de7c081f2703879bcfa15cabb256fdeeda4423d Mon Sep 17 00:00:00 2001 From: David Remer Date: Thu, 22 Oct 2020 09:02:25 +0300 Subject: [PATCH] amount value should be a string when send to the api --- modules/ppcp-api-client/src/Entity/class-amount.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ppcp-api-client/src/Entity/class-amount.php b/modules/ppcp-api-client/src/Entity/class-amount.php index 0148da6b3..1af99f5ab 100644 --- a/modules/ppcp-api-client/src/Entity/class-amount.php +++ b/modules/ppcp-api-client/src/Entity/class-amount.php @@ -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();