You are here

function payment_commerce_transaction_id_load in Payment for Drupal Commerce 7

Same name and namespace in other branches
  1. 7.2 payment_commerce.module \payment_commerce_transaction_id_load()

Load the Commerce transaction ID for a payment.

Parameters

integer $pid: The payment's PID.

Return value

array

3 calls to payment_commerce_transaction_id_load()
PaymentCommerceCheckoutWebTestCase::assertCheckout in tests/PaymentCommerceCheckoutWebTestCase.test
Executes the checkout process.
payment_commerce_payment_status_change in ./payment_commerce.module
Implements hook_payment_status_change().
payment_commerce_redirect_form in ./payment_commerce.module
Implements CALLBACK_commerce_payment_method_redirect_form().

File

./payment_commerce.module, line 217
Hook implementations and shared functions.

Code

function payment_commerce_transaction_id_load($pid) {
  return db_query("SELECT transaction_id FROM {payment_commerce} WHERE pid = :pid", array(
    ':pid' => $pid,
  ))
    ->fetchField();
}