StripeWebhooksListener
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'
- $api : StripeAPI
- $gateway : StripePaymentGateway
- $lastEventHasPaymentIntent : bool
- $lastEventObjectType : string
- $lastEventType : string
- __construct() : mixed
- addListeners() : mixed
- findPayment() : Payment|null
- getWebhookUrl() : string
- handleRequest() : mixed
- isCurrentListenerRequest() : bool
- parseInput() : string|false
- processEvent() : mixed
- validateInput() : stdClass|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
$api
public
StripeAPI
$api
= null
Tags
$gateway
public
StripePaymentGateway
$gateway
= null
Tags
$lastEventHasPaymentIntent
public
bool
$lastEventHasPaymentIntent
= false
Tags
$lastEventObjectType
public
string
$lastEventObjectType
= ''
Tags
$lastEventType
public
string
$lastEventType
= ''
Tags
Methods
__construct()
public
__construct(StripePaymentGateway $gateway, StripeAPI $api) : mixed
Parameters
- $gateway : StripePaymentGateway
- $api : StripeAPI
Tags
Return values
mixed —addListeners()
public
addListeners() : mixed
Tags
Return values
mixed —findPayment()
public
findPayment(stdClass $eventObject) : Payment|null
Parameters
- $eventObject : stdClass
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, stdClass $eventObject) : mixed
Parameters
- $payment : Payment
- $eventObject : stdClass
Tags
Return values
mixed —validateInput()
public
validateInput(string $rawInput) : stdClass|false
Parameters
- $rawInput : string
Tags
Return values
stdClass|false —fireExit()
protected
fireExit([int $statusCode = self::STATUS_SUCCESS ]) : mixed
Parameters
- $statusCode : int = self::STATUS_SUCCESS
-
Optional. Status code. Success by default (0).