diff --git a/src/Command/LoadWarrantySerialCommand.php b/src/Command/LoadWarrantySerialCommand.php index cd3c5342..ac40cfb1 100644 --- a/src/Command/LoadWarrantySerialCommand.php +++ b/src/Command/LoadWarrantySerialCommand.php @@ -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); } }