From 974d2f9c755fbe0e12f1aa9814f1b795b15b7f34 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Tue, 29 Nov 2022 09:54:05 +0100 Subject: [PATCH] Add currency sign to text --- app/PaymentDrivers/Stripe/Charge.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/PaymentDrivers/Stripe/Charge.php b/app/PaymentDrivers/Stripe/Charge.php index a9751a49ca73..94798d485c79 100644 --- a/app/PaymentDrivers/Stripe/Charge.php +++ b/app/PaymentDrivers/Stripe/Charge.php @@ -32,6 +32,7 @@ use Stripe\Exception\CardException; use Stripe\Exception\InvalidRequestException; use Stripe\Exception\RateLimitException; use Stripe\StripeClient; +use App\Utils\Number; class Charge { @@ -62,9 +63,9 @@ class Charge $invoice = Invoice::whereIn('id', $this->transformKeys(array_column($payment_hash->invoices(), 'invoice_id')))->withTrashed()->first(); if ($invoice) { - $description = ctrans('text.stripe_paymenttext', ['invoicenumber' => $invoice->number, 'amount' => $amount, 'client' => $this->stripe->client->present()->name()]); + $description = ctrans('text.stripe_paymenttext', ['invoicenumber' => $invoice->number, 'amount' => Number::formatMoney($amount, $this->stripe->client), 'client' => $this->stripe->client->present()->name()]); } else { - $description = ctrans('text.stripe_paymenttext_without_invoice', ['amount' => $amount, 'client' => $this->stripe->client->present()->name()]); + $description = ctrans('text.stripe_paymenttext_without_invoice', ['amount' => Number::formatMoney($amount, $this->stripe->client), 'client' => $this->stripe->client->present()->name()]); } $this->stripe->init();