Skip to content

Commit

Permalink
Merge pull request #49 from sharald/zerofraction
Browse files Browse the repository at this point in the history
Preserving zero fraction on json_encode
  • Loading branch information
makasim committed Apr 10, 2019
2 parents 85accf9 + 529726e commit 1d02fd5
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 1d02fd5

Please sign in to comment.