fixes
This commit is contained in:
parent
8d14c6b2bd
commit
87d5e50557
2 changed files with 4 additions and 1 deletions
|
|
@ -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:
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue