1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 00:11:35 +02:00
This commit is contained in:
David Bomba 2019-10-10 22:08:02 +11:00
parent 8d14c6b2bd
commit 87d5e50557
2 changed files with 4 additions and 1 deletions

View File

@ -216,7 +216,7 @@ class StripePaymentDriver extends BasePaymentDriver
{
$payment_intent_data = [
'amount' => $this->convertToStripeAmount($data['amount_with_fee'], $this->client->currency()->precision),
'->currency()' => $this->client->getCurrencyCode(),
'currency' => $this->client->getCurrencyCode(),
'customer' => $this->findOrCreateCustomer(),
'description' => $data['invoices']->pluck('id'), //todo more meaningful description here:
];

View File

@ -18,6 +18,7 @@ use App\Models\CompanyToken;
use App\Models\GatewayType;
use App\Models\GroupSetting;
use App\Models\Invoice;
use App\Models\Payment;
use App\Models\PaymentType;
use App\Models\User;
use App\Models\UserAccount;
@ -135,12 +136,14 @@ class RandomDataSeeder extends Seeder
if(rand(0, 1)) {
$payment = App\Models\Payment::create([
'payment_date' => now(),
'user_id' => $user->id,
'company_id' => $company->id,
'client_id' => $client->id,
'amount' => $invoice->balance,
'transaction_reference' => rand(0,500),
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
'status_id' => Payment::STATUS_COMPLETED,
]);
$payment->invoices()->save($invoice);