You are here

function uc_payment_load_payments in Ubercart 5

Same name and namespace in other branches
  1. 8.4 payment/uc_payment/uc_payment.module \uc_payment_load_payments()
  2. 6.2 payment/uc_payment/uc_payment.module \uc_payment_load_payments()
  3. 7.3 payment/uc_payment/uc_payment.module \uc_payment_load_payments()

Load an array of all the payments for order $order_id.

3 calls to uc_payment_load_payments()
uc_payment_balance in payment/uc_payment/uc_payment.module
Return the balance of payments on an order.
uc_payment_by_order_form in payment/uc_payment/uc_payment.module
uc_payment_order in payment/uc_payment/uc_payment.module
Implementation of hook_order().

File

payment/uc_payment/uc_payment.module, line 1050

Code

function uc_payment_load_payments($order_id, $action = NULL) {
  $payments = array();
  $result = db_query("SELECT * FROM {uc_payment_receipts} WHERE order_id = %d " . "ORDER BY received ASC", $order_id);
  while ($payment = db_fetch_object($result)) {
    $payments[] = $payment;
  }
  if (count($payments) == 0) {
    $payments = FALSE;
  }
  return $payments;
}