update SlackNotifySubscriber.php

This commit is contained in:
Marko 2023-09-29 17:27:50 +02:00
parent 034808cc67
commit 9445ec23ca
No known key found for this signature in database
3 changed files with 10 additions and 8 deletions

View File

@ -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'],

View File

@ -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;

View File

@ -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'];
}