芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Traits/MakePaymentTrait.php
whereIn('transaction_id', $transactionId)->orWhereIn('event_id', $transactionId); } else { $payment->where('transaction_id', $transactionId)->orWhere('event_id', $transactionId); } $payment = $payment->latest()->first(); $payment = ($payment && !empty($transactionId)) ? $payment : new Payment(); $payment->project_id = $invoice->project_id; $payment->invoice_id = $invoice->id; $payment->order_id = $invoice->order_id; $payment->gateway = $gateway; // If transactionId is array, then use the first one as transaction id $payment->transaction_id = is_array($transactionId) ? ($transactionId[0] ?? null) : $transactionId; $payment->event_id = is_array($transactionId) ? ($transactionId[0] ?? null) : $transactionId; $payment->currency_id = $invoice->currency_id; $payment->amount = $amount; $payment->paid_on = now(); $payment->status = $status; $payment->save(); return $payment; } }