function uc_payment_token_values in Ubercart 6.2
Same name and namespace in other branches
- 5 payment/uc_payment/uc_payment.module \uc_payment_token_values()
Implements hook_token_values().
1 call to uc_payment_token_values()
- template_preprocess_uc_packing_slip in shipping/
uc_shipping/ uc_shipping.module
File
- payment/
uc_payment/ uc_payment.module, line 133
Code
function uc_payment_token_values($type, $object = NULL) {
$values = array();
switch ($type) {
case 'order':
$order = $object;
$values['order-payment-method'] = _payment_method_data($order->payment_method, 'review');
if (empty($values['order-payment-method'])) {
$values['order-payment-method'] = _payment_method_data($order->payment_method, 'name');
}
$context = array(
'revision' => 'formatted',
'type' => 'amount',
);
$values['order-payment-balance'] = uc_price(uc_payment_balance($order), $context);
break;
}
return $values;
}