PayPalWebhookListener
extends 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() : string|false
- processEvent() : mixed
- validateInput() : array<string|int, 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(PayPalPaymentGateway $gateway) : mixed
Parameters
- $gateway : PayPalPaymentGateway
Tags
Return values
mixed —addListeners()
public
addListeners() : mixed
Tags
Return values
mixed —findPayment()
public
findPayment(array<string|int, mixed> $eventObject) : Payment|null
Parameters
- $eventObject : array<string|int, 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
parseInput() : string|false
Tags
Return values
string|false —processEvent()
public
processEvent(Payment $payment, array<string|int, mixed> $eventObject) : mixed
Parameters
- $payment : Payment
- $eventObject : array<string|int, mixed>
Tags
Return values
mixed —validateInput()
public
validateInput(string $rawInput) : array<string|int, mixed>|false
Parameters
- $rawInput : string
Tags
Return values
array<string|int, mixed>|false —fireExit()
protected
fireExit([int $statusCode = self::STATUS_SUCCESS ]) : mixed
Parameters
- $statusCode : int = self::STATUS_SUCCESS
-
Optional. Status code. Success by default (0).