AbstractWebhooksListener
in package
Tags
Table of Contents
- STATUS_PARSE_ERROR = 1
- STATUS_PROCESSING_ERROR = 128
- STATUS_REPOSITORY_ERROR = 4
- STATUS_SUCCESS = 0
- STATUS_VALIDATION_ERROR = 2
- URL_KEY = 'mpa-listener'
- $gateway : PaymentGatewayInterface
- __construct() : mixed
- addListeners() : mixed
- findPayment() : Payment|null
- getWebhookUrl() : string
- handleRequest() : mixed
- isCurrentListenerRequest() : bool
- parseInput() : mixed
- processEvent() : mixed
- validateInput() : mixed|false
- fireExit() : mixed
Constants
STATUS_PARSE_ERROR
public
mixed
STATUS_PARSE_ERROR
= 1
Tags
STATUS_PROCESSING_ERROR
public
mixed
STATUS_PROCESSING_ERROR
= 128
Tags
STATUS_REPOSITORY_ERROR
public
mixed
STATUS_REPOSITORY_ERROR
= 4
Tags
STATUS_SUCCESS
public
mixed
STATUS_SUCCESS
= ""
Tags
STATUS_VALIDATION_ERROR
public
mixed
STATUS_VALIDATION_ERROR
= 2
Tags
URL_KEY
public
mixed
URL_KEY
= 'mpa-listener'
Tags
Properties
$gateway
public
PaymentGatewayInterface
$gateway
= null
Tags
Methods
__construct()
public
__construct(PaymentGatewayInterface $gateway) : mixed
Parameters
- $gateway : PaymentGatewayInterface
Tags
Return values
mixed —addListeners()
public
addListeners() : mixed
Tags
Return values
mixed —findPayment()
public
abstract findPayment(mixed $validInput) : Payment|null
Parameters
- $validInput : mixed
Tags
Return values
Payment|null —getWebhookUrl()
public
getWebhookUrl() : string
Tags
Return values
string —handleRequest()
public
handleRequest() : mixed
Tags
Return values
mixed —isCurrentListenerRequest()
public
isCurrentListenerRequest() : bool
Tags
Return values
bool —parseInput()
public
abstract parseInput() : mixed
Tags
Return values
mixed —processEvent()
public
abstract processEvent(Payment $payment, mixed $validInput) : mixed
Parameters
- $payment : Payment
- $validInput : mixed
Tags
Return values
mixed —validateInput()
public
abstract validateInput(mixed $rawInput) : mixed|false
Parameters
- $rawInput : mixed
Tags
Return values
mixed|false —fireExit()
protected
fireExit([int $statusCode = self::STATUS_SUCCESS ]) : mixed
Parameters
- $statusCode : int = self::STATUS_SUCCESS
-
Optional. Status code. Success by default (0).