wip
This commit is contained in:
@@ -18,7 +18,9 @@ class OnlinePaymentController extends Controller
|
||||
public function store(Request $request)
|
||||
{
|
||||
// Validate the order id
|
||||
$request->validate(['orderId' => ['required', 'string', 'max:50', 'exists:online_payment_histories,orderId']]);
|
||||
if (validator($request->all(), ['orderId' => ['required', 'string', 'max:50', 'exists:online_payment_histories,orderId']])->fails()) {
|
||||
return ['wrong order id'];
|
||||
}
|
||||
|
||||
// Find order from history
|
||||
$paymentHistory = OnlinePaymentHistory::where('orderId', $request->orderId)->first();
|
||||
|
||||
Reference in New Issue
Block a user