You are here

public function CommercePaymentTransactionEntityController::create in Commerce Core 7

Create a default payment transaction.

Parameters

array $values: An array of values to set, keyed by property name.

Return value

A payment transaction object with all default fields initialized.

Overrides DrupalCommerceEntityController::create

File

modules/payment/includes/commerce_payment_transaction.controller.inc, line 24
The controller for the payment transaction entity containing the CRUD operations.

Class

CommercePaymentTransactionEntityController
The controller class for payment transactions contains methods for the transaction CRUD operations. The load method is inherited from the default controller.

Code

public function create(array $values = array()) {
  global $user;
  $values += array(
    'transaction_id' => NULL,
    'revision_id' => NULL,
    'uid' => $user->uid,
    'order_id' => 0,
    'payment_method' => '',
    'instance_id' => '',
    'remote_id' => '',
    'message' => '',
    'message_variables' => array(),
    'amount' => 0,
    'currency_code' => '',
    'status' => '',
    'remote_status' => '',
    'payload' => array(),
    'created' => '',
    'changed' => '',
  );
  return parent::create($values);
}