Add currency sign to text

This commit is contained in:
Lars Kusch 2022-11-29 09:54:05 +01:00 committed by GitHub
parent 40a78a4336
commit 974d2f9c75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ use Stripe\Exception\CardException;
use Stripe\Exception\InvalidRequestException; use Stripe\Exception\InvalidRequestException;
use Stripe\Exception\RateLimitException; use Stripe\Exception\RateLimitException;
use Stripe\StripeClient; use Stripe\StripeClient;
use App\Utils\Number;
class Charge class Charge
{ {
@ -62,9 +63,9 @@ class Charge
$invoice = Invoice::whereIn('id', $this->transformKeys(array_column($payment_hash->invoices(), 'invoice_id')))->withTrashed()->first(); $invoice = Invoice::whereIn('id', $this->transformKeys(array_column($payment_hash->invoices(), 'invoice_id')))->withTrashed()->first();
if ($invoice) { 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 { } 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(); $this->stripe->init();