Module Maintenance + création du module Recette

This commit is contained in:
2021-04-01 20:44:45 +02:00
parent a887f6892b
commit 8d8ca3fe2f
92 changed files with 6334 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace PayPlugModule\Controller;
use PayPlugModule\Event\Notification\UnknownNotificationEvent;
use PayPlugModule\Service\PaymentService;
use Thelia\Controller\Front\BaseFrontController;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Core\HttpFoundation\Response;
use Thelia\Log\Tlog;
class NotificationController extends BaseFrontController
{
public function entryPoint(Request $request)
{
/** @var PaymentService $paymentService */
$paymentService = $this->container->get('payplugmodule_payment_service');
Tlog::getInstance()->addAlert('Notification received');
Tlog::getInstance()->addAlert($request->getContent());
$notificationResource = $paymentService->getNotificationResource($request);
$notificationEvent = new UnknownNotificationEvent($notificationResource);
$this->dispatch(UnknownNotificationEvent::UNKNOWN_NOTIFICATION_EVENT, $notificationEvent);
return new Response();
}
}