function Payment::__construct in Payment 7
Constructor.
Parameters
mixed[] $properties: An associative array. Keys are property names and values are property values.
Overrides PaymentCommon::__construct
File
- ./
payment.classes.inc, line 132 - The API and related functions for executing and managing payments.
Class
- Payment
- A single payment. Contains all payment-specific data.
Code
function __construct(array $properties = array()) {
global $user;
parent::__construct($properties);
if (is_null($this->uid)) {
$this->uid = $user->uid;
}
if (!$this->statuses) {
// We purposefully avoid Payment::setStatus(), because this is the
// payment's first status.
$this->statuses[] = new PaymentStatusItem(PAYMENT_STATUS_NEW);
}
}