function commerce_payment_transaction_get_properties in Commerce Core 7
Callback for getting payment transaction properties.
See also
commerce_payment_entity_property_info()
1 string reference to 'commerce_payment_transaction_get_properties'
- commerce_payment_entity_property_info in modules/
payment/ commerce_payment.info.inc - Implements hook_entity_property_info().
File
- modules/
payment/ commerce_payment.module, line 1169 - Defines the payment system and checkout integration.
Code
function commerce_payment_transaction_get_properties($transaction, array $options, $name) {
switch ($name) {
case 'user':
return $transaction->uid;
case 'order':
return !empty($transaction->order_id) ? $transaction->order_id : commerce_order_new();
case 'message':
if ($transaction->message) {
return t($transaction->message, is_array($transaction->message_variables) ? $transaction->message_variables : array());
}
else {
return '';
}
}
}