Skip to content

Commit

Permalink
Use Money::getCurrency
Browse files Browse the repository at this point in the history
  • Loading branch information
trejjam authored and f3l1x committed Jan 13, 2021
1 parent cedaf60 commit b9d3c5d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Entity/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ final private function __construct()

public static function of(
Money $money,
string $curr,
string $label,
string $refId,
string $email,
Expand All @@ -85,7 +84,7 @@ public static function of(
{
$p = new static();
$p->price = $money->multipliedBy(100, RoundingMode::UNNECESSARY)->getAmount()->toInt();
$p->curr = $curr;
$p->curr = $money->getCurrency()->getCurrencyCode();
$p->label = $label;
$p->refId = $refId;
$p->email = $email;
Expand Down

0 comments on commit b9d3c5d

Please sign in to comment.