function payment_webform_insert in Payment for Webform 7
Insert a Payment available for referencing through a Webform component.
Parameters
integer $cid: The CID of the component the reference is available for.
integer $pid: The PID of the available payment.
Return value
integer SAVED_NEW
3 calls to payment_webform_insert()
- PaymentWebformTestQueueWebTestCase::testQueueCRUD in tests/
PaymentWebformTestQueueWebTestCase.test - PaymentWebformTestQueueWebTestCase::testQueueWebformImplementation in tests/
PaymentWebformTestQueueWebTestCase.test - payment_webform_payment_finish in ./
payment_webform.module - Implements Payment::finish_callback.
File
- ./
payment_webform.module, line 145 - Hook implementations and shared functions.
Code
function payment_webform_insert($cid, $pid) {
$data = array(
'cid' => $cid,
'pid' => $pid,
);
return drupal_write_record('payment_webform', $data);
}