where('public_id', $publicId) ->where('payment_provider', $hitpay->name()) ->first(); if ($order !== null && ! $order->isPaid()) { try { $checkout->markPaid($order, $hitpay->checkPayment($order)); } catch (PaymentException $e) { report($e); } } return response('OK'); } }