add Logging
This commit is contained in:
@@ -9,7 +9,6 @@ use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\Finder\Finder;
|
||||
|
||||
|
||||
class Hiltes
|
||||
{
|
||||
// init file system
|
||||
@@ -37,7 +36,7 @@ class Hiltes
|
||||
* @param string $data
|
||||
* @return void
|
||||
*/
|
||||
public function export(string $data) : void
|
||||
public function export(string $data): void
|
||||
{
|
||||
try {
|
||||
$new_file_path = $this->current_dir_path . "/hiltes/c2h/" . $this->createFileName();
|
||||
@@ -114,8 +113,8 @@ class Hiltes
|
||||
$tSalNr = array();
|
||||
foreach ($tA['positions'] as $v) {
|
||||
if ($v['type'] == 'versandposition' || $v['sku'] == '') {
|
||||
// $SalesNumber = '000001';
|
||||
// $SalesGoodsGroupNumber = 9350;
|
||||
// $SalesNumber = '000001';
|
||||
// $SalesGoodsGroupNumber = 9350;
|
||||
|
||||
// Versandkosten werden nicht übermittelt
|
||||
continue;
|
||||
@@ -234,7 +233,7 @@ class Hiltes
|
||||
$payload = json_encode($param);
|
||||
|
||||
if ($auth) {
|
||||
$this->logger->info('Send Order ' . $url . ' ' . $payload);
|
||||
$this->logger->info('Send Order ' . $url . ' ' . $payload);
|
||||
}
|
||||
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json', $authorization));
|
||||
@@ -258,7 +257,7 @@ class Hiltes
|
||||
* @param mixed $data The data to be converted to JSON.
|
||||
* @return array The JSON object.
|
||||
*/
|
||||
public function createJson($data) : array
|
||||
public function createJson($data): array
|
||||
{
|
||||
$arr = array(
|
||||
'File' => array(
|
||||
@@ -375,7 +374,7 @@ class Hiltes
|
||||
try {
|
||||
//Status 3 für erfolgreich exportiert
|
||||
$order->setStatus(3);
|
||||
// $order->setHiltes($t);
|
||||
// $order->setHiltes($t);
|
||||
|
||||
$this->orderRepository->update($order, true);
|
||||
} catch (\Exception $exception) {
|
||||
@@ -402,4 +401,4 @@ class Hiltes
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user