diff --git a/app/Http/Controllers/ClientPortal/PaymentController.php b/app/Http/Controllers/ClientPortal/PaymentController.php index b3bbf2a94bcb..f4d9a50c6db7 100644 --- a/app/Http/Controllers/ClientPortal/PaymentController.php +++ b/app/Http/Controllers/ClientPortal/PaymentController.php @@ -231,7 +231,7 @@ class PaymentController extends Controller public function response(PaymentResponseRequest $request) { - $gateway = CompanyGateway::find($request->input('company_gateway_id'))->firstOrFail(); + $gateway = CompanyGateway::findOrFail($request->input('company_gateway_id')); $payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first();