auction_item_paid_for($nid)
ecommerce-5--4/contrib/auction/auction.module, line 267
Supposed to return true if the auction item has already been paid for. But between you and me, I am suspicious of the logic.
$nid Number, the Node ID
Boolean, true if the auction has been paid for.
<?php
function auction_item_paid_for($nid) {
$status = db_result(db_query('SELECT payment_status FROM {ec_transaction_product} tp
INNER JOIN {ec_transaction} t ON t.txnid = tp.txnid
WHERE nid = %d', $nid));
return $status == 1; //payment_get_status_id('completed');
}
?>