mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
ReRoute pay now links to show invoice if no gateways are present
This commit is contained in:
parent
3673f17a23
commit
6860ea9795
@ -224,7 +224,7 @@ class InvitationController extends Controller
|
||||
|
||||
$gateways = $invitation->contact->client->service()->getPaymentMethods($amount);
|
||||
|
||||
if(is_array($gateways))
|
||||
if(is_array($gateways) && count($gateways) >=1)
|
||||
{
|
||||
|
||||
$data = [
|
||||
@ -241,6 +241,11 @@ class InvitationController extends Controller
|
||||
return (new InstantPayment($request))->run();
|
||||
}
|
||||
|
||||
$entity = 'invoice';
|
||||
|
||||
if($invoice && is_array($gateways) && count($gateways) == 0)
|
||||
return redirect()->route('client.invoice.show', ['invoice' => $this->encodePrimaryKey($invitation->invoice_id)]);
|
||||
|
||||
abort(404, "Invoice not found");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user