mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 00:34:35 -04:00
Fixes for client portal authentications
This commit is contained in:
parent
a2503f0f40
commit
fe3ebc3a87
@ -95,8 +95,12 @@ class PaymentController extends Controller
|
|||||||
|
|
||||||
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first();
|
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first();
|
||||||
|
|
||||||
|
$invoice = Invoice::with('client')->find($payment_hash->fee_invoice_id);
|
||||||
|
$client = $invoice->client->exists() ? $invoice->client : auth()->user()->client;
|
||||||
|
|
||||||
return $gateway
|
return $gateway
|
||||||
->driver(auth()->user()->client)
|
// ->driver(auth()->user()->client)
|
||||||
|
->driver($client)
|
||||||
->setPaymentMethod($request->input('payment_method_id'))
|
->setPaymentMethod($request->input('payment_method_id'))
|
||||||
->setPaymentHash($payment_hash)
|
->setPaymentHash($payment_hash)
|
||||||
->checkRequirements()
|
->checkRequirements()
|
||||||
|
@ -37,6 +37,7 @@ class ContactKeyLogin
|
|||||||
{
|
{
|
||||||
if (Auth::guard('contact')->check()) {
|
if (Auth::guard('contact')->check()) {
|
||||||
Auth::guard('contact')->logout();
|
Auth::guard('contact')->logout();
|
||||||
|
$request->session()->invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request->segment(2) && $request->segment(2) == 'magic_link' && $request->segment(3)) {
|
if ($request->segment(2) && $request->segment(2) == 'magic_link' && $request->segment(3)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user