mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 00:24:36 -04:00
Fixes for blank currency_id in manually created payments
This commit is contained in:
parent
8918431b51
commit
c1081f46ce
@ -58,11 +58,16 @@ class CreditCard
|
|||||||
|
|
||||||
public function paymentView(array $data)
|
public function paymentView(array $data)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
$description = $this->stripe->decodeUnicodeString(ctrans('texts.invoices') . ': ' . collect($data['invoices'])->pluck('invoice_number')) . " for client {$this->stripe->client->present()->name()}";
|
||||||
|
|
||||||
|
|
||||||
$payment_intent_data = [
|
$payment_intent_data = [
|
||||||
'amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()),
|
'amount' => $this->stripe->convertToStripeAmount($data['total']['amount_with_fee'], $this->stripe->client->currency()->precision, $this->stripe->client->currency()),
|
||||||
'currency' => $this->stripe->client->getCurrencyCode(),
|
'currency' => $this->stripe->client->getCurrencyCode(),
|
||||||
'customer' => $this->stripe->findOrCreateCustomer(),
|
'customer' => $this->stripe->findOrCreateCustomer(),
|
||||||
'description' => $this->stripe->decodeUnicodeString(ctrans('texts.invoices') . ': ' . collect($data['invoices'])->pluck('invoice_number')),
|
'description' => $description,
|
||||||
'metadata' => [
|
'metadata' => [
|
||||||
'payment_hash' => $this->stripe->payment_hash->hash,
|
'payment_hash' => $this->stripe->payment_hash->hash,
|
||||||
'gateway_type_id' => GatewayType::CREDIT_CARD,
|
'gateway_type_id' => GatewayType::CREDIT_CARD,
|
||||||
|
@ -211,6 +211,9 @@ class PaymentRepository extends BaseRepository {
|
|||||||
$payment->currency_id = $client_currency;
|
$payment->currency_id = $client_currency;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$payment->currency_id = $company_currency;
|
||||||
|
|
||||||
|
|
||||||
return $payment;
|
return $payment;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user