phpDocumentor

OrderStatusPaidRepository

Class OrderStatusPaidRepository

Table of Contents

$historyReader  : OrderStatusHistoryReader
$logger  : AfterbuyLogger
$paidReader  : OrderStatusPaidReader
__construct()  : mixed
OrderStatusPaidRepository constructor.
getAfterbuyPaidStatus()  : AfterbuyOrderStatus
Returns the afterbuy paid status.
getStatus()  : AfterbuyOrderStatus
Returns an instance of `AfterbuyOrderStatus`, containing information if the order is marked as 'paid', 'unpaid' or 'unknown'. These infos are accessible via the `::isXYZ` methods.
handleCorruptedDataError()  : void
Handles the exception for corrupted order status history data.

Properties

Methods

getStatus()

Returns an instance of `AfterbuyOrderStatus`, containing information if the order is marked as 'paid', 'unpaid' or 'unknown'. These infos are accessible via the `::isXYZ` methods.

private getStatus(OrderId $orderId, array<string|int, mixed> $paidStatus, array<string|int, mixed> $unpaidStatus) : AfterbuyOrderStatus
Parameters
$orderId : OrderId
$paidStatus : array<string|int, mixed>
$unpaidStatus : array<string|int, mixed>
Tags
throws
OrderPaidStatusNotFoundException
throws
OrderStatusDataCorruptedException
Return values
AfterbuyOrderStatus

handleCorruptedDataError()

Handles the exception for corrupted order status history data.

private handleCorruptedDataError(array<string|int, mixed>|null $paidStatus, array<string|int, mixed>|null $unpaidStatus, array<string|int, mixed>|null $unknownStatus, OrderStatusDataCorruptedException $e) : void

This method collects as much information as possible and throws an AfterbuyPaidException. Additionally, an error is logged, containing all the details.

Parameters
$paidStatus : array<string|int, mixed>|null
$unpaidStatus : array<string|int, mixed>|null
$unknownStatus : array<string|int, mixed>|null
$e : OrderStatusDataCorruptedException
Tags
throws
AfterbuyOrderStatusPaidException
Return values
void

Search results