PaymentDriver - Convert quote to invoice on payment
Signed-off-by: Kristián Feldsam <feldsam@gmail.com>
This commit is contained in:
parent
f119a6f74c
commit
d7368851f5
|
|
@ -698,6 +698,13 @@ class BasePaymentDriver
|
|||
if (! $invoice->canBePaid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// check if invoice is quote and if is, them convert it
|
||||
if($invoice->isQuote()) {
|
||||
$invoiceService = app('App\Services\InvoiceService');
|
||||
$invoice = $invoiceService->convertQuote($invoice);
|
||||
}
|
||||
|
||||
$invoice->markSentIfUnsent();
|
||||
|
||||
$payment = Payment::createNew($invitation);
|
||||
|
|
|
|||
Loading…
Reference in New Issue