CoolCMS API

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

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
Return values
bool
On this page

Search results