You are here

function PaymentEntityController::save in Payment 7

Implements EntityAPIControllerInterface.

Parameters

$transaction: Optionally a DatabaseTransaction object to use. Allows overrides to pass in their transaction object.

Overrides EntityAPIController::save

File

./payment.classes.inc, line 387
The API and related functions for executing and managing payments.

Class

PaymentEntityController
Entity API controller for payment entities.

Code

function save($entity, DatabaseTransaction $transaction = NULL) {
  $payment = $entity;

  // Save the payment.
  $payment->pmid = $payment->method->pmid;
  $return = parent::save($payment, $transaction);
  unset($payment->pmid);
  return $return;
}