Include payment information

Created on 6 January 2012, almost 14 years ago
Updated 17 September 2025, 22 days ago

First off, thank you for addressing one of the most glaring shortcomings of Drupal Commerce.

However, to quote Wikipedia, "A receipt is a written acknowledgment that a specified article or sum of money as an exchange for goods or services. The receipt is evidence of purchase of the property or service obtained in the exchange." (emphasis added) The documents generated by this module are invoices, not receipts, because they provide no indication of whether or not the invoice has already been paid. As a first stab toward making the payment info available in the template, we can add the following lines to _commerce_invoice_receipt_get_invoice_info():

  $info['payment_method'] = $order->data['payment_method'];
  $info['status'] = $order->status;

  $payments = commerce_payment_transaction_load_multiple(NULL, array('order_id' => $order->order_number));
  if (is_array($payments)) {
    foreach($payments as $payment) {
      $info['payments'] .= $payment->message .'<br />';
    }
  }

Thank you for your consideration.

✨ Feature request
Status

Closed: outdated

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BenStallings

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024