Add Stripe terminal and department variables API endpoints
This update introduces new endpoints for managing Stripe terminal readers, locations, and department-specific configurations. It also adds support for creating, updating, and retrieving department variables along with enhanced validation, logging, and permission checks. These updates improve integration and expand functionality for Stripe and department-related operations.
This commit is contained in:
@@ -97,12 +97,14 @@ class authentication implements authentication_i
|
||||
{
|
||||
// Get the token from the headers
|
||||
$headers = getallheaders();
|
||||
if (!isset($headers['Authorization'])) {
|
||||
if (!isset($headers['Authorization']) && !isset($_GET['token'])) {
|
||||
return false;
|
||||
}
|
||||
$token = $headers['Authorization'];
|
||||
// Strip the Bearer prefix
|
||||
$token = str_replace('Bearer ', '', $token);
|
||||
$token = $_GET['token'] ?? $headers['Authorization'];
|
||||
// Strip the Bearer prefix (If the token is from the headers)
|
||||
if (isset($headers['Authorization'])) {
|
||||
$token = str_replace('Bearer ', '', $token);
|
||||
}
|
||||
// Get the token from the database
|
||||
$token = (new plate_scanners_o())->getPlateScannerByApiKey($token);
|
||||
// Check if the token exists
|
||||
|
||||
Reference in New Issue
Block a user