mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
fixes
This commit is contained in:
parent
8d14c6b2bd
commit
87d5e50557
@ -216,7 +216,7 @@ class StripePaymentDriver extends BasePaymentDriver
|
|||||||
{
|
{
|
||||||
$payment_intent_data = [
|
$payment_intent_data = [
|
||||||
'amount' => $this->convertToStripeAmount($data['amount_with_fee'], $this->client->currency()->precision),
|
'amount' => $this->convertToStripeAmount($data['amount_with_fee'], $this->client->currency()->precision),
|
||||||
'->currency()' => $this->client->getCurrencyCode(),
|
'currency' => $this->client->getCurrencyCode(),
|
||||||
'customer' => $this->findOrCreateCustomer(),
|
'customer' => $this->findOrCreateCustomer(),
|
||||||
'description' => $data['invoices']->pluck('id'), //todo more meaningful description here:
|
'description' => $data['invoices']->pluck('id'), //todo more meaningful description here:
|
||||||
];
|
];
|
||||||
|
@ -18,6 +18,7 @@ use App\Models\CompanyToken;
|
|||||||
use App\Models\GatewayType;
|
use App\Models\GatewayType;
|
||||||
use App\Models\GroupSetting;
|
use App\Models\GroupSetting;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
|
use App\Models\Payment;
|
||||||
use App\Models\PaymentType;
|
use App\Models\PaymentType;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Models\UserAccount;
|
use App\Models\UserAccount;
|
||||||
@ -135,12 +136,14 @@ class RandomDataSeeder extends Seeder
|
|||||||
|
|
||||||
if(rand(0, 1)) {
|
if(rand(0, 1)) {
|
||||||
$payment = App\Models\Payment::create([
|
$payment = App\Models\Payment::create([
|
||||||
|
'payment_date' => now(),
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'amount' => $invoice->balance,
|
'amount' => $invoice->balance,
|
||||||
'transaction_reference' => rand(0,500),
|
'transaction_reference' => rand(0,500),
|
||||||
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
|
'payment_type_id' => PaymentType::CREDIT_CARD_OTHER,
|
||||||
|
'status_id' => Payment::STATUS_COMPLETED,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$payment->invoices()->save($invoice);
|
$payment->invoices()->save($invoice);
|
||||||
|
Loading…
Reference in New Issue
Block a user