Comment out sending to callback URL. #704

This commit is contained in:
Korina Cordero 2022-09-20 02:38:32 +00:00
parent f8910860a6
commit 138c60a61b

View file

@ -79,7 +79,7 @@ class LoadWarrantySerialCommand extends Command
} }
// send results back to third party // send results back to third party
$this->sendResults($output_info); // $this->sendResults($output_info);
return 0; return 0;
} }
@ -208,6 +208,8 @@ class LoadWarrantySerialCommand extends Command
// (5) Empty line - ignore // (5) Empty line - ignore
// (6) empty sku - log // (6) empty sku - log
// TODO: count the number of fields
// check if the line is a header // check if the line is a header
if ($row[0] == 'SerialNumber') if ($row[0] == 'SerialNumber')
{ {
@ -378,14 +380,12 @@ class LoadWarrantySerialCommand extends Command
protected function sendResults($output_info) 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(); $curl = curl_init();
$options = [ $options = [
@ -401,8 +401,7 @@ class LoadWarrantySerialCommand extends Command
curl_setopt_array($curl, $options); curl_setopt_array($curl, $options);
$res = curl_exec($curl); $res = curl_exec($curl);
curl_close($curl); */ curl_close($curl);
} }
} }