2026-03-11 11:19:03|submit|{"einvoice_version":"1.0","invoice_type_code":"11","type":"b2b","consolidated_invoice":false,"multi_invoice":false,"redirect_url":"https:\/\/my04.awfatech.com\/main\/app\/callback\/einvoice_status.php","callback_url":"https:\/\/my04.awfatech.com\/main\/app\/callback\/einvoice_status.php","secret_key":"5gMrZLfI1qZEpbjVxBH9aZSwRWmrxlNt","direct_submit":true,"app_code_client":"raudhah","supplier_school_id":0,"supplier_msic_code":"84121","supplier_tin":"C25725479100","supplier_id_type":"BRN","supplier_id_value":"1304560W","supplier_sst_no":"NA","supplier_reg_no":"1304560W","supplier_city":"Kajang","supplier_postcode":"43000","supplier_state":"Selangor","supplier_addr_line_1":"3-1, Jalan Putra 4","supplier_addr_line_2":"Taman Putra Kajang","supplier_addr_line_3":"","supplier_country":"Malaysia","supplier_name":"Raudhah Islamic Sdn. Bhd.","supplier_phone":"+60122692600","supplier_email":"sri.arraudhah@yahoo.com","submit_document":[{"invoice_id":"VC-RM-002931","reference_no":"VC-RM-002931","issue_date_time":"2026-03-11 01:19:03","period_start":"2026-01-14","period_end":"2026-03-21","period_description":"30 days","payment_means_code":"03","bank_account":null,"payment_note":"","prepaid_id":"","prepaid_amount":0,"prepaid_date_time":"","taxable_amount":5000,"sub_tax_amount":0,"tax_category_id":"06","line_extension_amount":5000,"tax_exclusive_amount":0,"tax_inclusive_amount":0,"allowance_total":0,"charge_total":5000,"rounding_amount":0,"payable_amount":5000,"invoice_lines":[{"id":"492903","unit_code":"C62","quantity":"1","line_allowance_reason":"None","discount_percentage":0,"discount_amount":0,"service_charge_reason":"None","service_percentage":0,"service_amount":0,"line_extension":5000,"line_tax_amount":0,"line_taxable":0,"tax_rate":0,"exemption_reason":"None","item_description":"PREMISE OF RMC HQ","classification_code":"022"}],"buyer_school_id":"4"}]}
2026-03-11 11:19:03|response|
AwfatechEinvoiceApi
TypeError
TypeError
App\Helpers\AuthOnBehalfHelper::generateOnBehalfToken(): Argument #1 ($tin) must be of type string, null given, called in /home/awfatech-einvoice-api/app/Modules/Einvoice/Services/LhdnService.php on line 19
POST einvoiceapi.awfatech.com
PHP 8.3.24 — Laravel 12.21.0
Collapse
Expand
vendor frames
34 vendor frames collapsed
app/Helpers/AuthOnBehalfHelper.php
:23
public static function getRob($supplier_id): ?string
{
return Supplier::find($supplier_id)->supplier_reg_no ?? null;
}
public static function generateOnBehalfToken(string $tin, ?string $rob = null): ?string
{
$endpoint = config('services.lhdn.endpoint_api');
$scope = config('services.lhdn.scope');
$url = rtrim($endpoint, '/') . '/connect/token';
$company = DB::connection('mysql_auth')->table('company')
->where('status', 'active')
->where('id', 1)
->first(['client_id', 'client_secret_1', 'tin']);
if (!$company || empty($company->client_id) || empty($company->client_secret_1)) {
app/Modules/Einvoice/Services/LhdnService.php
:19
}
public function tokenLhdn($tin, $rob)
{
// return $this->authLhdnHelper->generateToken();
return $this->authOnBehalfHelper->generateOnBehalfToken($tin, $rob);
}
public function getStateCode($stateName)
{
$stateJsonPath = public_path('templates/json/StateCodes.json');
$stateList = [];
if (file_exists($stateJsonPath)) {
$stateList = json_decode(file_get_contents($stateJsonPath), true);
}
foreach ($stateList as $state) {
app/Modules/Einvoice/Services/LhdnService.php
:73
return null;
}
public function validateTin($tin, $rob, $documentType, $idValue)
{
$tokenLhdn = $this->tokenLhdn($tin, $rob);
return Http::withHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $tokenLhdn,
])->get(config('services.lhdn.endpoint_einvoice_submit') . '/taxpayer/validate/' . $tin . '?' . 'idType=' . $documentType . '&idValue=' . $idValue);
}
public function isValidState($stateName)
{
$stateJsonPath = public_path('templates/json/StateCodes.json');
$stateList = [];
if (file_exists($stateJsonPath)) {
app/Modules/Einvoice/Services/EinvoiceService.php
:281
$tin = $doc['buyer_tin'] ?? null;
$buyerRegNo = $doc['buyer_reg_no'] ?? null;
$documentType = $doc['buyer_id_type'] ?? null;
$idValue = $doc['buyer_id_value'] ?? null;
$validateTin = $this->lhdnService->validateTin($tin, $buyerRegNo, $documentType, $idValue);
if (isset($validateTin['status']) && $validateTin['status'] === 404) {
$errors[] = "TIN validation failed " . ($validateTin['message'] ?? 'Unknown error');
} elseif (isset($validateTin['status']) && $validateTin['status'] !== 200) {
$errors[] = "TIN validation returned unexpected status: " . ($validateTin['status'] ?? 'Unknown status');
}
if (!isset($doc['buyer_school_id']) || trim((string)$doc['buyer_school_id']) === '') {
$errors[] = "buyer_school_id is missing or invalid";
} elseif (!is_numeric($doc['buyer_school_id']) || intval($doc['buyer_school_id']) != $doc['buyer_school_id']) {
$errors[] = "buyer_school_id must be an integer";
}
app/Modules/Einvoice/Repositories/EinvoiceRepository.php
:84
//$data['submit_document'][$index]['buyer_email'] = $data['supplier_email'] ?? null;
//}
//}
//}
$validationResults = $this->einvoiceService->validateSubmitDocument($data);
switch (true) {
case $data['type'] == 'b2c' && $data['multi_invoice'] == true:
$storeInvoice = $this->einvoiceService->storeInvoice($data, $validationResults);
if ($storeInvoice) {
$responseUrl = $endpoinPage . '/einvoice-form-multi?batch_key=' . $storeInvoice['batch_key'] ?? $endpoinPage . '/einvoice-result?batch_key=' . $storeInvoice['batch_key'];
$response = [
'status' => 200,
'message' => 'Redirect to details e-invoice b2c multi page individual.',
'response' => $responseUrl,
];
$this->logApiActivity($response, 'Invoice created successfully', $storeInvoice['batch_key'], 200);
app/Modules/Einvoice/Actions/BaseEinvoiceAction.php
:13
{
public function __construct(protected EinvoiceRepository $einvoiceRepository) {}
public function submitInv(array $data)
{
return $this->einvoiceRepository->createInvoice($data);
}
public function submitSelfBilled(array $data)
{
return $this->einvoiceRepository->createInvoice($data);
}
public function submitConsolidatedInv(array $data)
{
return $this->einvoiceRepository->createConsolidatedInvoice($data);
}
app/Modules/Einvoice/Controllers/EinvoiceController.php
:74
{
$dynamicDb = new DynamicDatabaseConnection();
$dynamicDb->setDatabase(date('Y'));
try {
$submitInv = $this->baseEinvoiceAction->submitInv($request->toArray());
return $submitInv;
} catch (\Exception $e) {
return ApiResponseHelper::error('An internal server error occurred. Please try again later. ', 500);
}
}
public function submitSelfBilled(BaseEinvoiceRequest $request)
{
$dynamicDb = new DynamicDatabaseConnection();
$dynamicDb->setDatabase(date('Y'));
vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
:46
if (method_exists($controller, 'callAction')) {
return $controller->callAction($method, $parameters);
}
return $controller->{$method}(...array_values($parameters));
}
/**
* Resolve the parameters for the controller.
*
* @param \Illuminate\Routing\Route $route
* @param mixed $controller
* @param string $method
* @return array
*/
protected function resolveParameters(Route $route, $controller, $method)
vendor/laravel/framework/src/Illuminate/Routing/Route.php
:265
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
protected function runController()
{
return $this->controllerDispatcher()->dispatch(
$this, $this->getController(), $this->getControllerMethod()
);
}
/**
* Get the controller instance for the route.
*
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
vendor/laravel/framework/src/Illuminate/Routing/Route.php
:211
{
$this->container = $this->container ?: new Container;
try {
if ($this->isControllerAction()) {
return $this->runController();
}
return $this->runCallable();
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* Checks whether the route's action is a controller.
*
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:808
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(fn ($request) => $this->prepareResponse(
$request, $route->run()
));
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:169
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:126
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
try {
return $pipeline($this->passable);
} finally {
if ($this->finally) {
($this->finally)($this->passable);
}
}
}
/**
* Run the pipeline and return the result.
*
* @return mixed
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:807
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(fn ($request) => $this->prepareResponse(
$request, $route->run()
));
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:786
$request->setRouteResolver(fn () => $route);
$this->events->dispatch(new RouteMatched($route, $request));
return $this->prepareResponse($request,
$this->runRouteWithinStack($route, $request)
);
}
/**
* Run the given route within a Stack "onion" instance.
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function runRouteWithinStack(Route $route, Request $request)
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:750
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*/
protected function findRoute($request)
{
$this->events->dispatch(new Routing($request));
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:739
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:200
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Response $response
* @return void
*/
public function terminate($request, $response)
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:169
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
:21
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function clean($request)
{
$this->cleanParameterBag($request->query);
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php
:31
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function transform($key, $value)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
:21
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function clean($request)
{
$this->cleanParameterBag($request->query);
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php
:51
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function transform($key, $value)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php
:27
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException('The POST data is too large.');
}
return $next($request);
}
/**
* Determine the server 'post_max_size' as bytes.
*
* @return int
*/
protected function getPostMaxSize()
{
if (is_numeric($postMaxSize = ini_get('post_max_size'))) {
return (int) $postMaxSize;
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php
:109
null,
$this->getHeaders($data)
);
}
return $next($request);
}
/**
* Determine if the incoming request has a maintenance mode bypass cookie.
*
* @param \Illuminate\Http\Request $request
* @param array $data
* @return bool
*/
protected function hasValidBypassCookie($request, array $data)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php
:61
$this->cors->varyHeader($response, 'Access-Control-Request-Method');
return $response;
}
$response = $next($request);
if ($request->getMethod() === 'OPTIONS') {
$this->cors->varyHeader($response, 'Access-Control-Request-Method');
}
return $this->cors->addActualRequestHeaders($response, $request);
}
/**
* Get the path from the configuration to determine if the CORS service should run.
*
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php
:58
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames());
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function setTrustedProxyIpAddresses(Request $request)
{
$trustedIps = $this->proxies() ?: config('trustedproxy.proxies');
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php
:22
* @param \Closure $next
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle(Request $request, Closure $next)
{
return $next($request);
}
/**
* Invoke the deferred callbacks.
*
* @param \Illuminate\Http\Request $request
* @param \Symfony\Component\HttpFoundation\Response $response
* @return void
*/
public function terminate(Request $request, Response $response)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePathEncoding.php
:26
if (! mb_check_encoding($decodedPath, 'UTF-8')) {
throw new MalformedUrlException;
}
return $next($request);
}
}
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:126
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
try {
return $pipeline($this->passable);
} finally {
if ($this->finally) {
($this->finally)($this->passable);
}
}
}
/**
* Run the pipeline and return the result.
*
* @return mixed
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:175
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:144
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
vendor/laravel/framework/src/Illuminate/Foundation/Application.php
:1219
*/
public function handleRequest(Request $request)
{
$kernel = $this->make(HttpKernelContract::class);
$response = $kernel->handle($request)->send();
$kernel->terminate($request, $response);
}
/**
* Handle the incoming Artisan command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @return int
*/
public function handleCommand(InputInterface $input)
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());
Request
POST
/api/v1/einvoice/submit-invoice
Headers
content-type
application/json
host
einvoiceapi.awfatech.com
Body
{
"einvoice_version": "1.0",
"invoice_type_code": "11",
"type": "b2b",
"consolidated_invoice": false,
"multi_invoice": false,
"redirect_url": "https://my04.awfatech.com/main/app/callback/einvoice_status.php",
"callback_url": "https://my04.awfatech.com/main/app/callback/einvoice_status.php",
"secret_key": "5gMrZLfI1qZEpbjVxBH9aZSwRWmrxlNt",
"direct_submit": true,
"app_code_client": "raudhah",
"supplier_school_id": 0,
"supplier_msic_code": "84121",
"supplier_tin": "C25725479100",
"supplier_id_type": "BRN",
"supplier_id_value": "1304560W",
"supplier_sst_no": "NA",
"supplier_reg_no": "1304560W",
"supplier_city": "Kajang",
"supplier_postcode": "43000",
"supplier_state": "Selangor",
"supplier_addr_line_1": "3-1, Jalan Putra 4",
"supplier_addr_line_2": "Taman Putra Kajang",
"supplier_addr_line_3": null,
"supplier_country": "Malaysia",
"supplier_name": "Raudhah Islamic Sdn. Bhd.",
"supplier_phone": "+60122692600",
"supplier_email": "sri.arraudhah@yahoo.com",
"submit_document": [
{
"invoice_id": "VC-RM-002931",
"reference_no": "VC-RM-002931",
"issue_date_time": "2026-03-11 01:19:03",
"period_start": "2026-01-14",
"period_end": "2026-03-21",
"period_description": "30 days",
"payment_means_code": "03",
"bank_account": null,
"payment_note": null,
"prepaid_id": null,
"prepaid_amount": 0,
"prepaid_date_time": null,
"taxable_amount": 5000,
"sub_tax_amount": 0,
"tax_category_id": "06",
"line_extension_amount": 5000,
"tax_exclusive_amount": 0,
"tax_inclusive_amount": 0,
"allowance_total": 0,
"charge_total": 5000,
"rounding_amount": 0,
"payable_amount": 5000,
"invoice_lines": [
{
"id": "492903",
"unit_code": "C62",
"quantity": "1",
"line_allowance_reason": "None",
"discount_percentage": 0,
"discount_amount": 0,
"service_charge_reason": "None",
"service_percentage": 0,
"service_amount": 0,
"line_extension": 5000,
"line_tax_amount": 0,
"line_taxable": 0,
"tax_rate": 0,
"exemption_reason": "None",
"item_description": "PREMISE OF RMC HQ",
"classification_code": "022"
}
],
"buyer_school_id": "4"
}
]
}
Application
Routing
controller
App\Modules\Einvoice\Controllers\EinvoiceController@submitInv
Database Queries
mysql_auth
(42.44 ms)
select * from `suppliers` where `app_code_client` = 'raudhah' and `supplier_school_id` = 0 and `suppliers`.`deleted_at` is null limit 1
mysql_auth
(0.99 ms)
select * from `suppliers` where (`app_code_client` = 'raudhah' and `supplier_school_id` = 0) and `suppliers`.`deleted_at` is null limit 1
2026-03-11 11:19:03|success
2026-03-11 11:19:19|submit|{"einvoice_version":"1.0","invoice_type_code":"11","type":"b2b","consolidated_invoice":false,"multi_invoice":false,"redirect_url":"https:\/\/my04.awfatech.com\/main\/app\/callback\/einvoice_status.php","callback_url":"https:\/\/my04.awfatech.com\/main\/app\/callback\/einvoice_status.php","secret_key":"5gMrZLfI1qZEpbjVxBH9aZSwRWmrxlNt","direct_submit":true,"app_code_client":"raudhah","supplier_school_id":0,"supplier_msic_code":"84121","supplier_tin":"C25725479100","supplier_id_type":"BRN","supplier_id_value":"1304560W","supplier_sst_no":"NA","supplier_reg_no":"1304560W","supplier_city":"Kajang","supplier_postcode":"43000","supplier_state":"Selangor","supplier_addr_line_1":"3-1, Jalan Putra 4","supplier_addr_line_2":"Taman Putra Kajang","supplier_addr_line_3":"","supplier_country":"Malaysia","supplier_name":"Raudhah Islamic Sdn. Bhd.","supplier_phone":"+60122692600","supplier_email":"sri.arraudhah@yahoo.com","submit_document":[{"invoice_id":"VC-RIS-012377","reference_no":"VC-RIS-012377","issue_date_time":"2026-03-11 01:19:19","period_start":"2026-01-12","period_end":"2026-03-27","period_description":"30 days","payment_means_code":"03","bank_account":null,"payment_note":"","prepaid_id":"","prepaid_amount":0,"prepaid_date_time":"","taxable_amount":2500,"sub_tax_amount":0,"tax_category_id":"06","line_extension_amount":2500,"tax_exclusive_amount":0,"tax_inclusive_amount":0,"allowance_total":0,"charge_total":2500,"rounding_amount":0,"payable_amount":2500,"invoice_lines":[{"id":"494090","unit_code":"C62","quantity":"1","line_allowance_reason":"None","discount_percentage":0,"discount_amount":0,"service_charge_reason":"None","service_percentage":0,"service_amount":0,"line_extension":2500,"line_tax_amount":0,"line_taxable":0,"tax_rate":0,"exemption_reason":"None","item_description":"PREMISE OF RIS KAJANG","classification_code":"022"}],"buyer_school_id":"1"}]}
2026-03-11 11:19:19|response|
AwfatechEinvoiceApi
TypeError
TypeError
App\Helpers\AuthOnBehalfHelper::generateOnBehalfToken(): Argument #1 ($tin) must be of type string, null given, called in /home/awfatech-einvoice-api/app/Modules/Einvoice/Services/LhdnService.php on line 19
POST einvoiceapi.awfatech.com
PHP 8.3.24 — Laravel 12.21.0
Collapse
Expand
vendor frames
34 vendor frames collapsed
app/Helpers/AuthOnBehalfHelper.php
:23
public static function getRob($supplier_id): ?string
{
return Supplier::find($supplier_id)->supplier_reg_no ?? null;
}
public static function generateOnBehalfToken(string $tin, ?string $rob = null): ?string
{
$endpoint = config('services.lhdn.endpoint_api');
$scope = config('services.lhdn.scope');
$url = rtrim($endpoint, '/') . '/connect/token';
$company = DB::connection('mysql_auth')->table('company')
->where('status', 'active')
->where('id', 1)
->first(['client_id', 'client_secret_1', 'tin']);
if (!$company || empty($company->client_id) || empty($company->client_secret_1)) {
app/Modules/Einvoice/Services/LhdnService.php
:19
}
public function tokenLhdn($tin, $rob)
{
// return $this->authLhdnHelper->generateToken();
return $this->authOnBehalfHelper->generateOnBehalfToken($tin, $rob);
}
public function getStateCode($stateName)
{
$stateJsonPath = public_path('templates/json/StateCodes.json');
$stateList = [];
if (file_exists($stateJsonPath)) {
$stateList = json_decode(file_get_contents($stateJsonPath), true);
}
foreach ($stateList as $state) {
app/Modules/Einvoice/Services/LhdnService.php
:73
return null;
}
public function validateTin($tin, $rob, $documentType, $idValue)
{
$tokenLhdn = $this->tokenLhdn($tin, $rob);
return Http::withHeaders([
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $tokenLhdn,
])->get(config('services.lhdn.endpoint_einvoice_submit') . '/taxpayer/validate/' . $tin . '?' . 'idType=' . $documentType . '&idValue=' . $idValue);
}
public function isValidState($stateName)
{
$stateJsonPath = public_path('templates/json/StateCodes.json');
$stateList = [];
if (file_exists($stateJsonPath)) {
app/Modules/Einvoice/Services/EinvoiceService.php
:281
$tin = $doc['buyer_tin'] ?? null;
$buyerRegNo = $doc['buyer_reg_no'] ?? null;
$documentType = $doc['buyer_id_type'] ?? null;
$idValue = $doc['buyer_id_value'] ?? null;
$validateTin = $this->lhdnService->validateTin($tin, $buyerRegNo, $documentType, $idValue);
if (isset($validateTin['status']) && $validateTin['status'] === 404) {
$errors[] = "TIN validation failed " . ($validateTin['message'] ?? 'Unknown error');
} elseif (isset($validateTin['status']) && $validateTin['status'] !== 200) {
$errors[] = "TIN validation returned unexpected status: " . ($validateTin['status'] ?? 'Unknown status');
}
if (!isset($doc['buyer_school_id']) || trim((string)$doc['buyer_school_id']) === '') {
$errors[] = "buyer_school_id is missing or invalid";
} elseif (!is_numeric($doc['buyer_school_id']) || intval($doc['buyer_school_id']) != $doc['buyer_school_id']) {
$errors[] = "buyer_school_id must be an integer";
}
app/Modules/Einvoice/Repositories/EinvoiceRepository.php
:84
//$data['submit_document'][$index]['buyer_email'] = $data['supplier_email'] ?? null;
//}
//}
//}
$validationResults = $this->einvoiceService->validateSubmitDocument($data);
switch (true) {
case $data['type'] == 'b2c' && $data['multi_invoice'] == true:
$storeInvoice = $this->einvoiceService->storeInvoice($data, $validationResults);
if ($storeInvoice) {
$responseUrl = $endpoinPage . '/einvoice-form-multi?batch_key=' . $storeInvoice['batch_key'] ?? $endpoinPage . '/einvoice-result?batch_key=' . $storeInvoice['batch_key'];
$response = [
'status' => 200,
'message' => 'Redirect to details e-invoice b2c multi page individual.',
'response' => $responseUrl,
];
$this->logApiActivity($response, 'Invoice created successfully', $storeInvoice['batch_key'], 200);
app/Modules/Einvoice/Actions/BaseEinvoiceAction.php
:13
{
public function __construct(protected EinvoiceRepository $einvoiceRepository) {}
public function submitInv(array $data)
{
return $this->einvoiceRepository->createInvoice($data);
}
public function submitSelfBilled(array $data)
{
return $this->einvoiceRepository->createInvoice($data);
}
public function submitConsolidatedInv(array $data)
{
return $this->einvoiceRepository->createConsolidatedInvoice($data);
}
app/Modules/Einvoice/Controllers/EinvoiceController.php
:74
{
$dynamicDb = new DynamicDatabaseConnection();
$dynamicDb->setDatabase(date('Y'));
try {
$submitInv = $this->baseEinvoiceAction->submitInv($request->toArray());
return $submitInv;
} catch (\Exception $e) {
return ApiResponseHelper::error('An internal server error occurred. Please try again later. ', 500);
}
}
public function submitSelfBilled(BaseEinvoiceRequest $request)
{
$dynamicDb = new DynamicDatabaseConnection();
$dynamicDb->setDatabase(date('Y'));
vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php
:46
if (method_exists($controller, 'callAction')) {
return $controller->callAction($method, $parameters);
}
return $controller->{$method}(...array_values($parameters));
}
/**
* Resolve the parameters for the controller.
*
* @param \Illuminate\Routing\Route $route
* @param mixed $controller
* @param string $method
* @return array
*/
protected function resolveParameters(Route $route, $controller, $method)
vendor/laravel/framework/src/Illuminate/Routing/Route.php
:265
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
protected function runController()
{
return $this->controllerDispatcher()->dispatch(
$this, $this->getController(), $this->getControllerMethod()
);
}
/**
* Get the controller instance for the route.
*
* @return mixed
*
* @throws \Illuminate\Contracts\Container\BindingResolutionException
*/
vendor/laravel/framework/src/Illuminate/Routing/Route.php
:211
{
$this->container = $this->container ?: new Container;
try {
if ($this->isControllerAction()) {
return $this->runController();
}
return $this->runCallable();
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* Checks whether the route's action is a controller.
*
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:808
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(fn ($request) => $this->prepareResponse(
$request, $route->run()
));
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:169
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:126
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
try {
return $pipeline($this->passable);
} finally {
if ($this->finally) {
($this->finally)($this->passable);
}
}
}
/**
* Run the pipeline and return the result.
*
* @return mixed
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:807
$middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(fn ($request) => $this->prepareResponse(
$request, $route->run()
));
}
/**
* Gather the middleware for the given route with resolved class names.
*
* @param \Illuminate\Routing\Route $route
* @return array
*/
public function gatherRouteMiddleware(Route $route)
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:786
$request->setRouteResolver(fn () => $route);
$this->events->dispatch(new RouteMatched($route, $request));
return $this->prepareResponse($request,
$this->runRouteWithinStack($route, $request)
);
}
/**
* Run the given route within a Stack "onion" instance.
*
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
*/
protected function runRouteWithinStack(Route $route, Request $request)
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:750
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Routing\Route
*/
protected function findRoute($request)
{
$this->events->dispatch(new Routing($request));
vendor/laravel/framework/src/Illuminate/Routing/Router.php
:739
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:200
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Http\Response $response
* @return void
*/
public function terminate($request, $response)
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:169
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
/**
* Get a Closure that represents a slice of the application onion.
*
* @return \Closure
*/
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
:21
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function clean($request)
{
$this->cleanParameterBag($request->query);
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php
:31
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function transform($key, $value)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php
:21
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function clean($request)
{
$this->cleanParameterBag($request->query);
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php
:51
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
protected function transform($key, $value)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePostSize.php
:27
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException('The POST data is too large.');
}
return $next($request);
}
/**
* Determine the server 'post_max_size' as bytes.
*
* @return int
*/
protected function getPostMaxSize()
{
if (is_numeric($postMaxSize = ini_get('post_max_size'))) {
return (int) $postMaxSize;
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php
:109
null,
$this->getHeaders($data)
);
}
return $next($request);
}
/**
* Determine if the incoming request has a maintenance mode bypass cookie.
*
* @param \Illuminate\Http\Request $request
* @param array $data
* @return bool
*/
protected function hasValidBypassCookie($request, array $data)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/HandleCors.php
:61
$this->cors->varyHeader($response, 'Access-Control-Request-Method');
return $response;
}
$response = $next($request);
if ($request->getMethod() === 'OPTIONS') {
$this->cors->varyHeader($response, 'Access-Control-Request-Method');
}
return $this->cors->addActualRequestHeaders($response, $request);
}
/**
* Get the path from the configuration to determine if the CORS service should run.
*
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php
:58
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames());
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request.
*
* @param \Illuminate\Http\Request $request
* @return void
*/
protected function setTrustedProxyIpAddresses(Request $request)
{
$trustedIps = $this->proxies() ?: config('trustedproxy.proxies');
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/InvokeDeferredCallbacks.php
:22
* @param \Closure $next
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle(Request $request, Closure $next)
{
return $next($request);
}
/**
* Invoke the deferred callbacks.
*
* @param \Illuminate\Http\Request $request
* @param \Symfony\Component\HttpFoundation\Response $response
* @return void
*/
public function terminate(Request $request, Response $response)
{
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Http/Middleware/ValidatePathEncoding.php
:26
if (! mb_check_encoding($decodedPath, 'UTF-8')) {
throw new MalformedUrlException;
}
return $next($request);
}
}
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:208
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
};
}
/**
vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php
:126
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
try {
return $pipeline($this->passable);
} finally {
if ($this->finally) {
($this->finally)($this->passable);
}
}
}
/**
* Run the pipeline and return the result.
*
* @return mixed
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:175
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
* @return void
*/
public function bootstrap()
{
if (! $this->app->hasBeenBootstrapped()) {
$this->app->bootstrapWith($this->bootstrappers());
vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
:144
$this->requestStartedAt = Carbon::now();
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
$this->app['events']->dispatch(
new RequestHandled($request, $response)
);
return $response;
vendor/laravel/framework/src/Illuminate/Foundation/Application.php
:1219
*/
public function handleRequest(Request $request)
{
$kernel = $this->make(HttpKernelContract::class);
$response = $kernel->handle($request)->send();
$kernel->terminate($request, $response);
}
/**
* Handle the incoming Artisan command.
*
* @param \Symfony\Component\Console\Input\InputInterface $input
* @return int
*/
public function handleCommand(InputInterface $input)
// Bootstrap Laravel and handle the request...
/** @var Application $app */
$app = require_once __DIR__.'/../bootstrap/app.php';
$app->handleRequest(Request::capture());
Request
POST
/api/v1/einvoice/submit-invoice
Headers
content-type
application/json
host
einvoiceapi.awfatech.com
Body
{
"einvoice_version": "1.0",
"invoice_type_code": "11",
"type": "b2b",
"consolidated_invoice": false,
"multi_invoice": false,
"redirect_url": "https://my04.awfatech.com/main/app/callback/einvoice_status.php",
"callback_url": "https://my04.awfatech.com/main/app/callback/einvoice_status.php",
"secret_key": "5gMrZLfI1qZEpbjVxBH9aZSwRWmrxlNt",
"direct_submit": true,
"app_code_client": "raudhah",
"supplier_school_id": 0,
"supplier_msic_code": "84121",
"supplier_tin": "C25725479100",
"supplier_id_type": "BRN",
"supplier_id_value": "1304560W",
"supplier_sst_no": "NA",
"supplier_reg_no": "1304560W",
"supplier_city": "Kajang",
"supplier_postcode": "43000",
"supplier_state": "Selangor",
"supplier_addr_line_1": "3-1, Jalan Putra 4",
"supplier_addr_line_2": "Taman Putra Kajang",
"supplier_addr_line_3": null,
"supplier_country": "Malaysia",
"supplier_name": "Raudhah Islamic Sdn. Bhd.",
"supplier_phone": "+60122692600",
"supplier_email": "sri.arraudhah@yahoo.com",
"submit_document": [
{
"invoice_id": "VC-RIS-012377",
"reference_no": "VC-RIS-012377",
"issue_date_time": "2026-03-11 01:19:19",
"period_start": "2026-01-12",
"period_end": "2026-03-27",
"period_description": "30 days",
"payment_means_code": "03",
"bank_account": null,
"payment_note": null,
"prepaid_id": null,
"prepaid_amount": 0,
"prepaid_date_time": null,
"taxable_amount": 2500,
"sub_tax_amount": 0,
"tax_category_id": "06",
"line_extension_amount": 2500,
"tax_exclusive_amount": 0,
"tax_inclusive_amount": 0,
"allowance_total": 0,
"charge_total": 2500,
"rounding_amount": 0,
"payable_amount": 2500,
"invoice_lines": [
{
"id": "494090",
"unit_code": "C62",
"quantity": "1",
"line_allowance_reason": "None",
"discount_percentage": 0,
"discount_amount": 0,
"service_charge_reason": "None",
"service_percentage": 0,
"service_amount": 0,
"line_extension": 2500,
"line_tax_amount": 0,
"line_taxable": 0,
"tax_rate": 0,
"exemption_reason": "None",
"item_description": "PREMISE OF RIS KAJANG",
"classification_code": "022"
}
],
"buyer_school_id": "1"
}
]
}
Application
Routing
controller
App\Modules\Einvoice\Controllers\EinvoiceController@submitInv
Database Queries
mysql_auth
(3.35 ms)
select * from `suppliers` where `app_code_client` = 'raudhah' and `supplier_school_id` = 0 and `suppliers`.`deleted_at` is null limit 1
mysql_auth
(0.85 ms)
select * from `suppliers` where (`app_code_client` = 'raudhah' and `supplier_school_id` = 0) and `suppliers`.`deleted_at` is null limit 1
2026-03-11 11:19:19|success