From 9445ec23ca343bdec25f9c0779f0acd096d81d81 Mon Sep 17 00:00:00 2001 From: Marko <52066939+HeX87@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:27:50 +0200 Subject: [PATCH] update SlackNotifySubscriber.php --- src/Command/HiltesExportCommand.php | 4 +++- src/EventSubscriber/SlackNotifySubscriber.php | 4 ---- src/Helper/Hiltes.php | 10 +++++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Command/HiltesExportCommand.php b/src/Command/HiltesExportCommand.php index 926bf2c..7b63430 100644 --- a/src/Command/HiltesExportCommand.php +++ b/src/Command/HiltesExportCommand.php @@ -63,6 +63,8 @@ class HiltesExportCommand extends Command foreach ($orders as $order) { if($order->getStatus()>0) continue; $tA = $order->getData();#json_decode($order->getData()); + $tA['orderdate'] = "2023-08-30T12:05:24.000Z"; + #dd($order->getData()); #dd(array( # 'orderdate'=> $tA['orderdate'], @@ -178,4 +180,4 @@ class HiltesExportCommand extends Command return Command::SUCCESS; } -} +} \ No newline at end of file diff --git a/src/EventSubscriber/SlackNotifySubscriber.php b/src/EventSubscriber/SlackNotifySubscriber.php index 10bb5bb..639b79b 100644 --- a/src/EventSubscriber/SlackNotifySubscriber.php +++ b/src/EventSubscriber/SlackNotifySubscriber.php @@ -45,13 +45,9 @@ class SlackNotifySubscriber implements EventSubscriberInterface { $slack = new Client($this->slackWebhookUrl); - $order = $event->getControllerResult(); $method = $event->getRequest()->getMethod(); - // $this->logger->info('SlackNotifySubscriber: ' . $method); - //$this->logger->info('SlackNotifySubscriber: ' . $order); - //wenn es keine Bestellung ist oder es kein POST Request ist, dann return if (!$order instanceof Order || Request::METHOD_POST !== $method) { return; diff --git a/src/Helper/Hiltes.php b/src/Helper/Hiltes.php index a334f49..92a16da 100644 --- a/src/Helper/Hiltes.php +++ b/src/Helper/Hiltes.php @@ -14,15 +14,19 @@ class Hiltes protected $current_dir_path; protected $apiKey; protected $hiltesApiHash = ''; - protected $hiltesUsr = 'admin'; - protected $hiltesPass = '1996'; - protected $hiltesApiUrl = 'https://api.orangejungle.eu'; + protected $hiltesUsr; + protected $hiltesPass; + protected $hiltesApiUrl; public function __construct() { $this->fsObject = new Filesystem(); $this->current_dir_path = getcwd(); + + $this->hiltesApiUrl = $_ENV['HILTES_API_URL']; + $this->hiltesUsr = $_ENV['HILTES_API_USER']; + $this->hiltesPass = $_ENV['HILTES_API_PASSWORD']; }