NotificationConsumer
in package
Consume incoming order notification class.
Table of Contents
- $signatureVerifier : SignatureVerifier
- __construct() : mixed
- Constructor.
- consume() : OrderDto
- Get orderDTO from notification content.
- extractSignatureData() : array<string|int, mixed>
- Extract parts with signature details from header value.
- validateNotification() : array<string|int, mixed>
- Validate notification body.
Properties
$signatureVerifier
private
SignatureVerifier
$signatureVerifier
Methods
__construct()
Constructor.
public
__construct(SignatureVerifier $signatureVerifier) : mixed
Parameters
- $signatureVerifier : SignatureVerifier
Return values
mixed —consume()
Get orderDTO from notification content.
public
consume(string $notification, string $signatureHeader) : OrderDto
Parameters
- $notification : string
- $signatureHeader : string
Tags
Return values
OrderDto —extractSignatureData()
Extract parts with signature details from header value.
private
extractSignatureData(string $signatureHeader) : array<string|int, mixed>
Parameters
- $signatureHeader : string
Tags
Return values
array<string|int, mixed> —validateNotification()
Validate notification body.
private
validateNotification(string $notification, string $signatureHeader) : array<string|int, mixed>
Parameters
- $notification : string
- $signatureHeader : string
Tags
Return values
array<string|int, mixed> —decoded notification JSON