function pay_transaction::states in Pay 7
Same name and namespace in other branches
- 6 includes/handlers/pay_transaction.inc \pay_transaction::states()
A list of possible payment states for a transaction.
This short list of possible states apply to all transactions, but the underlying activities, controlled by pay_methods, may contain more details.
3 calls to pay_transaction::states()
- pay_transaction::set_state in includes/
handlers/ pay_transaction.inc - Set the state of this transaction.
- pay_transaction::state in includes/
handlers/ pay_transaction.inc - Return the current state of this transaction.
- pay_transaction::update_status in includes/
handlers/ pay_transaction.inc
File
- includes/
handlers/ pay_transaction.inc, line 32 - A base class for payment transactions.
Class
- pay_transaction
- @file A base class for payment transactions.
Code
function states($state = NULL) {
$states = array(
'pending' => array(
'title' => t('Pending'),
'description' => t('The transaction has been created, but no successful or unsuccessful payment activities have been applied.'),
),
'active' => array(
'title' => t('Active'),
'description' => t('Payment activities are still in progress.'),
),
'complete' => array(
'title' => t('Complete'),
'description' => t('The transaction has been completed successfully.'),
),
'canceled' => array(
'title' => t('Canceled'),
'description' => t('The transaction has been cancelled.'),
),
'refunded' => array(
'title' => t('Refunded'),
'description' => t('The transaction has been refunded.'),
),
);
if ($state) {
return $states[$state];
}
return $states;
}