function uc_payment_delete in Ubercart 7.3
Same name and namespace in other branches
- 8.4 payment/uc_payment/uc_payment.module \uc_payment_delete()
- 5 payment/uc_payment/uc_payment.module \uc_payment_delete()
- 6.2 payment/uc_payment/uc_payment.module \uc_payment_delete()
Deletes a payment from the database.
1 call to uc_payment_delete()
- uc_payment_delete_confirm_form_submit in payment/
uc_payment/ uc_payment.admin.inc - Form submission handler for uc_payment_delete_confirm_form().
File
- payment/
uc_payment/ uc_payment.module, line 527
Code
function uc_payment_delete($receipt_id) {
if (!is_numeric($receipt_id)) {
return FALSE;
}
$payment = uc_payment_load($receipt_id);
$log_message = t('@method payment for @amount deleted.', array(
'@method' => $payment->method,
'@amount' => uc_currency_format($payment->amount),
));
uc_order_log_changes($payment->order_id, array(
$log_message,
));
db_delete('uc_payment_receipts')
->condition('receipt_id', $receipt_id)
->execute();
}