Skip to content

Commit

Permalink
use default currency if currency does not set
Browse files Browse the repository at this point in the history
  • Loading branch information
bladeroot committed Apr 2, 2021
1 parent 8d3c2d3 commit 1f3a548
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Message/CompletePurchaseResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function getTime()

public function getCurrency()
{
return $this->data['us_currency'];
return $this->data['us_currency'] ?? 'RUB';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Message/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function getData()
'lang' => $this->getLanguage(),
'us_client' => $this->getClient(),
'us_system' => 'freekassa',
'us_currency' => strtoupper($this->getCurrency()),
'us_currency' => strtoupper($this->getCurrency() ?? 'RUB'),
]);
}

Expand Down

0 comments on commit 1f3a548

Please sign in to comment.