Skip to content

Commit 2702c57

Browse files
committed
Bug fix.
1 parent 4d64824 commit 2702c57

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/Services/Payments/Robokassa/Payment.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,19 @@ class Payment
5252
public function __construct(int $number, float $amount)
5353
{
5454
$this->number = $number;
55-
$this->amount = $amount;
55+
// Format as it requires robokassa.
56+
$this->amount = number_format($amount, 2, '.', '');
5657
}
5758

5859
public function getNumber(): int
5960
{
6061
return $this->number;
6162
}
6263

63-
public function getAmount(): float
64+
/**
65+
* @return string Formatted amount string.
66+
*/
67+
public function getAmount(): string
6468
{
6569
return $this->amount;
6670
}

0 commit comments

Comments
 (0)