Always ensure contacts can pay an invoice with an invitation link

This commit is contained in:
David Bomba 2022-06-25 09:13:56 +10:00
parent a26fd73169
commit 77845c2259
2 changed files with 4 additions and 0 deletions

View File

@ -235,6 +235,9 @@ class InvitationController extends Controller
->with('contact.client')
->firstOrFail();
if($invitation->contact->trashed())
$invitation->contact->restore();
auth()->guard('contact')->loginUsingId($invitation->contact->id, true);
$invoice = $invitation->invoice;

View File

@ -255,6 +255,7 @@ class InstantPayment
'tokens' => $tokens,
'payment_method_id' => $payment_method_id,
'amount_with_fee' => $invoice_totals + $fee_totals,
'client' => $client,
];
if ($is_credit_payment || $totals <= 0) {