Resolve "CAPI call for warranty serial" #1632

Merged
korina.cordero merged 18 commits from 704-capi-call-for-warranty-serial into master 2022-09-23 03:14:28 +00:00
Showing only changes of commit 138c60a61b - Show all commits

View file

@ -79,7 +79,7 @@ class LoadWarrantySerialCommand extends Command
}
// send results back to third party
$this->sendResults($output_info);
// $this->sendResults($output_info);
return 0;
}
@ -208,6 +208,8 @@ class LoadWarrantySerialCommand extends Command
// (5) Empty line - ignore
// (6) empty sku - log
// TODO: count the number of fields
// check if the line is a header
if ($row[0] == 'SerialNumber')
{
@ -378,14 +380,12 @@ class LoadWarrantySerialCommand extends Command
protected function sendResults($output_info)
{
$json_output = json_encode($output_info);
$body = json_encode($output_info);
// error_log(print_r($json_output, true));
// error_log(print_r($body, true));
error_log('Sending json output to ' . $this->callback_url);
// TODO: make a test controller
// send json there
// log what it gets
/*
$curl = curl_init();
$options = [
@ -401,8 +401,7 @@ class LoadWarrantySerialCommand extends Command
curl_setopt_array($curl, $options);
$res = curl_exec($curl);
curl_close($curl); */
curl_close($curl);
}
}