Create New Folder
Create New File
Preview of search-customer.php
<?php
require_once __DIR__ . '/src/Services/Logger.php';
require_once __DIR__ . '/src/Api/McleodApiHandler.php';
require_once __DIR__ . '/src/Services/CustomerSearchService.php';
header('Content-Type: application/json');
try {
// Initialize logger
$logger = new \Services\Logger();
// Initialize customer service
$customerService = new CustomerSearchService($logger);
// Check for search parameters - support both name and MC Number
$searchName = $_GET['name'] ?? '';
$mcNumber = $_GET['mc_number'] ?? '';
if (empty($searchName) && empty($mcNumber)) {
throw new Exception('No search criteria provided');
}
// If MC Number is provided, search by MC Number
if (!empty($mcNumber)) {
$logger->info('Searching for customer with MC Number: ' . $mcNumber);
$customer = $customerService->findCustomerByMCNumber($mcNumber);
if ($customer) {
echo json_encode([
Parent Directory
logs
meki
src
templates
RateConProcessor.php
commodity-lookup.php
commodity_codes.txt
composer.json
create-location.php
file_manager.php
get-customer-by-mc.php
index.html
mcleod-editor.js
process-ratecon.php
search-customer.php
search-location.php
send-to-mcleod.php