payment\Payment
Model class for Payment
Synopsis
class Payment
extends DataObject
{
- // constants
- const SUCCESS = 'Success';
- const FAILURE = 'Failure';
- const INCOMPLETE = 'Incomplete';
- const PENDING = 'Pending';
- // members
- private static string $table_name = 'Payment';
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- // methods
- public Int updateStatus()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Constants
Name | Value |
---|---|
SUCCESS | 'Success' |
FAILURE | 'Failure' |
INCOMPLETE | 'Incomplete' |
PENDING | 'Pending' |
Members
private
-
$db
Method: The payment method used Status: - Incomplete (default): Payment created but nothing confirmed as successful - Success: Payment successful - Failure: Payment failed during process - Pending: Payment awaiting receipt/bank transfer etc - Incomplete: Payment cancelled Amount: The payment amount amd currency HTTPStatus: Status code of the HTTP response TxnID: An identifier we give to the payment gateway to identify a transaction -
$has_many
Errors: Errors returned from payment gateway when processing this payment -
$has_one
PaidBy: Member that processed this payment (optional) - $table_name
Methods
public
- updateStatus() — Update the payment status inclusing saving any errors from the gateway