function uc_payment_delete_confirm_form in Ubercart 5
Same name and namespace in other branches
- 6.2 payment/uc_payment/uc_payment.admin.inc \uc_payment_delete_confirm_form()
- 7.3 payment/uc_payment/uc_payment.admin.inc \uc_payment_delete_confirm_form()
1 string reference to 'uc_payment_delete_confirm_form'
- uc_payment_menu in payment/
uc_payment/ uc_payment.module - Implementation of hook_menu().
File
- payment/
uc_payment/ uc_payment.module, line 733
Code
function uc_payment_delete_confirm_form($order_id, $receipt_id) {
// Attempt to load the payment.
$payment = uc_payment_load($receipt_id);
// Get outta here if the payment doesn't exist.
if ($payment->order_id != $order_id) {
drupal_set_message(t('An error loading the payment information occurred.'));
drupal_goto('admin/store/orders/' . $order_id . '/payments');
}
$desc = '<strong>' . t('Payment information:') . '</strong> ' . t('@method payment of @amount received on @date.', array(
'@method' => $payment->method,
'@amount' => uc_currency_format($payment->amount),
'@date' => format_date($payment->received, 'short'),
));
$form['order_id'] = array(
'#type' => 'value',
'#value' => $order_id,
);
$form['receipt_id'] = array(
'#type' => 'value',
'#value' => $receipt_id,
);
return confirm_form($form, t('Are you sure you want to delete this payment?'), 'admin/store/orders/' . $order_id . '/payments', $desc, t('Delete'));
}