PaymentStatus
in package
FinalYes
Table of Contents
Constants
- BAD_PRICE : mixed = 10
- CANCELED : mixed = 5
- COMPLETED : mixed = 4
- EXPIRED : mixed = 8
- FAILED : mixed = 7
- INVALID : mixed = 11
- NEW : mixed = 1
- PENDING : mixed = 3
- REFUNDED : mixed = 6
- START : mixed = 2
- UNKNOWN : mixed = 0
- VOIDED : mixed = 9
Methods
- isFrozenForGateway() : bool
- May a gateway notification still change this payment's status?
Constants
BAD_PRICE
public
mixed
BAD_PRICE
= 10
CANCELED
public
mixed
CANCELED
= 5
COMPLETED
public
mixed
COMPLETED
= 4
EXPIRED
public
mixed
EXPIRED
= 8
FAILED
public
mixed
FAILED
= 7
INVALID
public
mixed
INVALID
= 11
NEW
public
mixed
NEW
= 1
PENDING
public
mixed
PENDING
= 3
REFUNDED
public
mixed
REFUNDED
= 6
START
public
mixed
START
= 2
UNKNOWN
public
mixed
UNKNOWN
= 0
VOIDED
public
mixed
VOIDED
= 9
Methods
isFrozenForGateway()
May a gateway notification still change this payment's status?
public
static isFrozenForGateway(int $currentStatus, bool $wasPaid) : bool
COMPLETED and REFUNDED are final. A cancelled/voided payment that had been paid
(paymentDatetime set) only got there by an explicit admin action, and a later gateway
notification must not flip it back (COMPLETED again) or onwards (REFUNDED) — every such
flip issues another invoice/credit note in the invoicing cron. Before payment, a
CANCELED/VOIDED payment stays open: the customer may still pay via another transaction.
Parameters
- $currentStatus : int
- $wasPaid : bool