mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 17:24:35 -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);
|
$gateways = $invitation->contact->client->service()->getPaymentMethods($amount);
|
||||||
|
|
||||||
if(is_array($gateways))
|
if(is_array($gateways) && count($gateways) >=1)
|
||||||
{
|
{
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
@ -241,6 +241,11 @@ class InvitationController extends Controller
|
|||||||
return (new InstantPayment($request))->run();
|
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");
|
abort(404, "Invoice not found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user