diff --git a/app/Http/Controllers/ClientPortal/PaymentController.php b/app/Http/Controllers/ClientPortal/PaymentController.php index ebf62177fc90..d784ca416c17 100644 --- a/app/Http/Controllers/ClientPortal/PaymentController.php +++ b/app/Http/Controllers/ClientPortal/PaymentController.php @@ -92,9 +92,7 @@ class PaymentController extends Controller { $gateway = CompanyGateway::findOrFail($request->input('company_gateway_id')); - - $payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first(); - + $payment_hash = PaymentHash::where('hash', $request->payment_hash)->first(); $invoice = Invoice::with('client')->find($payment_hash->fee_invoice_id); $client = $invoice->client->exists() ? $invoice->client : auth()->user()->client; diff --git a/app/Http/ValidationRules/PaymentAppliedValidAmount.php b/app/Http/ValidationRules/PaymentAppliedValidAmount.php index 357cde9f0ea0..7c8031e93f79 100644 --- a/app/Http/ValidationRules/PaymentAppliedValidAmount.php +++ b/app/Http/ValidationRules/PaymentAppliedValidAmount.php @@ -74,6 +74,7 @@ class PaymentAppliedValidAmount implements Rule } } - return $payment_amounts >= $invoice_amounts; + // nlog("{round($payment_amounts,3)} >= {round($invoice_amounts,3)}"); + return round($payment_amounts,3) >= round($invoice_amounts,3); } } diff --git a/routes/client.php b/routes/client.php index 85b4ca9aaa93..ecdf91f81a95 100644 --- a/routes/client.php +++ b/routes/client.php @@ -28,7 +28,7 @@ Route::get('error', 'ClientPortal\ContactHashLoginController@errorPage')->name(' Route::get('client/payment/{contact_key}/{payment_id}', 'ClientPortal\InvitationController@paymentRouter')->middleware(['domain_db','contact_key_login']); Route::get('client/ninja/{contact_key}/{company_key}', 'ClientPortal\NinjaPlanController@index')->name('client.ninja_contact_login')->middleware(['domain_db']); -Route::group(['middleware' => ['auth:contact', 'locale', 'check_client_existence','domain_db'], 'prefix' => 'client', 'as' => 'client.'], function () { +Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db'], 'prefix' => 'client', 'as' => 'client.'], function () { Route::get('dashboard', 'ClientPortal\DashboardController@index')->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit Route::get('plan', 'ClientPortal\NinjaPlanController@plan')->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit