Module Maintenance + création du module Recette
This commit is contained in:
37
local/modules/PayPlugModule/Event/Notification/PaymentNotificationEvent.php
Executable file
37
local/modules/PayPlugModule/Event/Notification/PaymentNotificationEvent.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace PayPlugModule\Event\Notification;
|
||||
|
||||
use Payplug\Resource\Payment;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class PaymentNotificationEvent extends ActionEvent
|
||||
{
|
||||
const PAYMENT_NOTIFICATION_EVENT = "payplugmodule_payment_notification_event";
|
||||
|
||||
/** @var Payment */
|
||||
protected $resource;
|
||||
|
||||
public function __construct(Payment $resource)
|
||||
{
|
||||
$this->resource = $resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Payment
|
||||
*/
|
||||
public function getResource(): Payment
|
||||
{
|
||||
return $this->resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Payment $resource
|
||||
* @return PaymentNotificationEvent
|
||||
*/
|
||||
public function setResource(Payment $resource): PaymentNotificationEvent
|
||||
{
|
||||
$this->resource = $resource;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
37
local/modules/PayPlugModule/Event/Notification/RefundNotificationEvent.php
Executable file
37
local/modules/PayPlugModule/Event/Notification/RefundNotificationEvent.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace PayPlugModule\Event\Notification;
|
||||
|
||||
use Payplug\Resource\Refund;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class RefundNotificationEvent extends ActionEvent
|
||||
{
|
||||
const REFUND_NOTIFICATION_EVENT = "payplugmodule_refund_notification_event";
|
||||
|
||||
/** @var Refund */
|
||||
protected $resource;
|
||||
|
||||
public function __construct(Refund $resource)
|
||||
{
|
||||
$this->resource = $resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Refund
|
||||
*/
|
||||
public function getResource(): Refund
|
||||
{
|
||||
return $this->resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Refund $resource
|
||||
* @return RefundNotificationEvent
|
||||
*/
|
||||
public function setResource(Refund $resource): RefundNotificationEvent
|
||||
{
|
||||
$this->resource = $resource;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
37
local/modules/PayPlugModule/Event/Notification/UnknownNotificationEvent.php
Executable file
37
local/modules/PayPlugModule/Event/Notification/UnknownNotificationEvent.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace PayPlugModule\Event\Notification;
|
||||
|
||||
use Payplug\Resource\IVerifiableAPIResource;
|
||||
use Thelia\Core\Event\ActionEvent;
|
||||
|
||||
class UnknownNotificationEvent extends ActionEvent
|
||||
{
|
||||
const UNKNOWN_NOTIFICATION_EVENT = "payplugmodule_unknown_notification_event";
|
||||
|
||||
/** @var IVerifiableAPIResource */
|
||||
protected $resource;
|
||||
|
||||
public function __construct(IVerifiableAPIResource $resource)
|
||||
{
|
||||
$this->resource = $resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return IVerifiableAPIResource
|
||||
*/
|
||||
public function getResource(): IVerifiableAPIResource
|
||||
{
|
||||
return $this->resource;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IVerifiableAPIResource $resource
|
||||
* @return UnknownNotificationEvent
|
||||
*/
|
||||
public function setResource(IVerifiableAPIResource $resource): UnknownNotificationEvent
|
||||
{
|
||||
$this->resource = $resource;
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user