From dd5c8129692a1fd0dd95866f8227718b65d8a266 Mon Sep 17 00:00:00 2001 From: Lars Kusch Date: Tue, 29 Nov 2022 09:55:20 +0100 Subject: [PATCH] Add currency sign --- app/PaymentDrivers/Stripe/ACH.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/PaymentDrivers/Stripe/ACH.php b/app/PaymentDrivers/Stripe/ACH.php index c40ad045d64f..cd386b8287b3 100644 --- a/app/PaymentDrivers/Stripe/ACH.php +++ b/app/PaymentDrivers/Stripe/ACH.php @@ -36,6 +36,7 @@ use Stripe\Exception\CardException; use Stripe\Exception\InvalidRequestException; use Stripe\Exception\RateLimitException; use Stripe\PaymentIntent; +use App\Utils\Number; class ACH { @@ -172,9 +173,9 @@ class ACH ->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()]); } @@ -210,9 +211,9 @@ class ACH ->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()]); } if (substr($cgt->token, 0, 2) === 'pm') { @@ -454,9 +455,9 @@ class ACH ->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()]); } if (substr($source->token, 0, 2) === 'pm') {