You are here

function commerce_worldpay_bg_txn_load in Commerce Worldpay 7

Loads a stored WPPR by ID.

Parameters

$id: The ID of the WPPR to load.

$type: The type of ID you've specified, either the serial numeric txn_id or the actual WorldPay wp_txn_id. Defaults to wp_txn_id.

$pre: Load only if it is before comunication with WorldPay - NOT FUNCTIONAL.

Return value

The current stored record of details on communications with with WorldPay for this transaction.

2 calls to commerce_worldpay_bg_txn_load()
commerce_worldpay_bg_response_page in includes/commerce_worldpay_bg.page.inc
Page callback that listens for transaction information from WorldPay.
commerce_worldpay_bg_txn_save in ./commerce_worldpay_bg.module
Saves information on the Worldpay transaction with some meta data related to local processing.

File

./commerce_worldpay_bg.module, line 973
Provides a Worldpay Business Gateway payment method for Drupal Commerce.

Code

function commerce_worldpay_bg_txn_load($id, $type = 'wp_txn_id', $pre = FALSE) {
  return db_select('commerce_worldpay_bg_txn', 'cwbt')
    ->fields('cwbt')
    ->condition('cwbt.' . $type, $id)
    ->execute()
    ->fetchAssoc();
}