From 529726e6c150510588ddf59ee34654a1e78d3897 Mon Sep 17 00:00:00 2001 From: Lars Harald Hvidsten Date: Wed, 10 Apr 2019 10:33:48 +0200 Subject: [PATCH] Preserving zero fraction on json_encode --- src/Payum/LaravelPackage/Model/Payment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Payum/LaravelPackage/Model/Payment.php b/src/Payum/LaravelPackage/Model/Payment.php index 09bbd01..7004413 100644 --- a/src/Payum/LaravelPackage/Model/Payment.php +++ b/src/Payum/LaravelPackage/Model/Payment.php @@ -19,7 +19,7 @@ class Payment extends Model implements PaymentInterface */ public function setDetails($details) { - $this->setAttribute('details', json_encode($details ?: array())); + $this->setAttribute('details', json_encode($details ?: array(), JSON_PRESERVE_ZERO_FRACTION)); } /** @@ -141,4 +141,4 @@ public function setCreditCard(CreditCardInterface $creditCard = null) { $this->creditCard = $creditCard; } -} \ No newline at end of file +}