You are here

function payment_commerce_transaction_save in Payment for Drupal Commerce 7.2

Same name and namespace in other branches
  1. 7 payment_commerce.module \payment_commerce_transaction_save()

Save a Commerce payment transaction for a payment.

Parameters

integer $pid: The PID of the Payment to load a Commerce payment transaction for.

integer $transaction_id: The ID of the Commerce payment transaction.

Return value

NULL

2 calls to payment_commerce_transaction_save()
PaymentCommerceDeleteOrderWebTestCase::assertCreateAndDeleteOrderAndPayment in tests/PaymentCommerceDeleteOrderWebTestCase.test
Creates an order, transaction and Payment, and then deletes them.
payment_commerce_form_process_submit_form_submit in ./payment_commerce.module
Implements CALLBACK_commerce_payment_method_submit_form_submit().

File

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

Code

function payment_commerce_transaction_save($pid, $transaction_id) {
  db_insert('payment_commerce')
    ->fields(array(
    'pid' => $pid,
    'transaction_id' => $transaction_id,
  ))
    ->execute();
}