We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4d64824 commit 2702c57Copy full SHA for 2702c57
app/Services/Payments/Robokassa/Payment.php
@@ -52,15 +52,19 @@ class Payment
52
public function __construct(int $number, float $amount)
53
{
54
$this->number = $number;
55
- $this->amount = $amount;
+ // Format as it requires robokassa.
56
+ $this->amount = number_format($amount, 2, '.', '');
57
}
58
59
public function getNumber(): int
60
61
return $this->number;
62
63
- public function getAmount(): float
64
+ /**
65
+ * @return string Formatted amount string.
66
+ */
67
+ public function getAmount(): string
68
69
return $this->amount;
70
0 commit comments