You are here

function payment_webform_load_nid in Payment for Webform 7

Load the Webform NID for a Payment.

Parameters

integer $pid:

Return value

integer|false

2 calls to payment_webform_load_nid()
payment_webform_page_finish in ./payment_webform.module
Menu page callback to call after a payment reference payment has finished.
payment_webform_page_finish_access in ./payment_webform.module
Check if a user has access to the finish page.

File

./payment_webform.module, line 110
Hook implementations and shared functions.

Code

function payment_webform_load_nid($pid) {
  return db_query("SELECT nid FROM {webform_component} wc LEFT JOIN {payment_webform} pw ON wc.cid = pw.cid WHERE pw.pid = :pid", array(
    ':pid' => $pid,
  ))
    ->fetchField();
}