You are here

function pay_transaction_state_name in Pay 7

Same name and namespace in other branches
  1. 6 pay.module \pay_transaction_state_name()

Return the 'nice' name for payment transaction states.

2 calls to pay_transaction_state_name()
pay_handler_argument_state::title in includes/views/pay_handler_argument_state.inc
Override the behavior of title(). Get the title of the state.
pay_handler_field_transaction_state::render in includes/views/pay_handler_field_transaction_state.inc
Render the field.

File

./pay.module, line 569
Pay module allows for accepting payments using pluggable payment backends.

Code

function pay_transaction_state_name($state) {

  // It's a transaction object?  Function as a wrapper for its state() method.
  if (is_object($state)) {
    return $state
      ->state(TRUE);
  }

  // Or else just return the label based on this name.
  return pay_transaction_states($state);
}