function pay_transaction_states in Pay 6
Same name and namespace in other branches
- 7 pay.module \pay_transaction_states()
Return a list of available transaction states.
1 call to pay_transaction_states()
- pay_transaction_state_name in ./
pay.module - Return the 'nice' name for payment transaction states.
1 string reference to 'pay_transaction_states'
- pay_views_data in includes/
views/ pay.views.inc - Implementation of hook_views_data(). TODO
File
- ./
pay.module, line 474 - Pay module allows for accepting payments using pluggable payment backends.
Code
function pay_transaction_states($state = NULL) {
static $states;
if (!isset($states)) {
$states = array();
foreach (pay_transaction_load()
->states() as $name => $info) {
$states[$name] = $info['title'];
}
}
if (isset($state)) {
return $states[$state];
}
return $states;
}