Update: 2026-05-09 18:11:10
This commit is contained in:
@@ -13,6 +13,7 @@ declare(strict_types=1);
|
||||
use App\Core\Database;
|
||||
use App\Core\Security;
|
||||
use App\Core\Validator;
|
||||
use App\Core\PaymentParser;
|
||||
use App\Middleware\AuthMiddleware;
|
||||
|
||||
$decoded = AuthMiddleware::check();
|
||||
@@ -23,7 +24,8 @@ if (!in_array($decoded['role'], ['admin', 'accountant', 'super_admin'])) {
|
||||
|
||||
$data = Security::sanitize(input());
|
||||
$paymentId = $data['payment_id'] ?? null;
|
||||
$bankReference = trim($data['bank_reference'] ?? '');
|
||||
$rawBankRef = trim($data['bank_reference'] ?? '');
|
||||
$bankReference = PaymentParser::extractReference($rawBankRef) ?: $rawBankRef;
|
||||
|
||||
$errors = Validator::validate($data, [
|
||||
'payment_id' => 'required',
|
||||
|
||||
Reference in New Issue
Block a user