Missing Columns Causing 500 Error in User Order API
A
Ali Aaied
When creating an order via the User Order API (store method in OrderController), the following columns are referenced:
- terminal_id
- staff_id
- channel
- terminal_session_id
However, these columns do not exist in the database, leading to a 500 Internal Server Error when an order is posted.
Temporary Fix:
To bypass the issue, these lines were commented out:
In the file app/Http/Controllers/Api/User/OrderController.php
from line 215 to 218
// $order['terminal_id'] = $request->terminal_id ?? null;
// $order['staff_id'] = $request->staff_id ?? null;
// $order['channel'] = $request->channel ?? 'web';
// $order['terminal_session_id'] = $request->terminal_session_id ?? null;
N
Nayeem Mohammad Hafiz
We would like to let you know that this issue will be fixed on our next update. However, if you need this on an emergency basis, please create a support ticket at our dedicated support portal at https://support.techvill.org/ with all the details and our support team will assist you there.