function uc_payment_uc_payment_receipt_delete in Ubercart 8.4
Implements hook_uc_payment_receipt_delete().
File
- payment/
uc_payment/ uc_payment.module, line 197 - Defines the payment API that lets payment modules interact with Ubercart.
Code
function uc_payment_uc_payment_receipt_delete(PaymentReceiptInterface $payment) {
$order = $payment
->getOrder();
// Log a message against the order.
$method_name = $payment
->getMethod() ? $payment
->getMethod()
->cartReviewTitle() : t('Other');
$log_message = t('@method payment for @amount deleted.', [
'@method' => $method_name,
'@amount' => uc_currency_format($payment
->getAmount()),
]);
$order
->logChanges([
$log_message,
]);
}