Skip to content

Commit

Permalink
Preserving zero fraction on json_encode
Browse files Browse the repository at this point in the history
  • Loading branch information
sharald committed Apr 10, 2019
1 parent 85accf9 commit 529726e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Payum/LaravelPackage/Model/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/**
Expand Down Expand Up @@ -141,4 +141,4 @@ public function setCreditCard(CreditCardInterface $creditCard = null)
{
$this->creditCard = $creditCard;
}
}
}

0 comments on commit 529726e

Please sign in to comment.