diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 8ec9b5b48d..65c2393c22 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -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: ]; diff --git a/database/seeds/RandomDataSeeder.php b/database/seeds/RandomDataSeeder.php index 0e2956af9e..5165cda4d3 100644 --- a/database/seeds/RandomDataSeeder.php +++ b/database/seeds/RandomDataSeeder.php @@ -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);