You are here

function pay_method_gateway::authorize_action in Pay 7

Same name and namespace in other branches
  1. 6 includes/handlers/pay_method_gateway.inc \pay_method_gateway::authorize_action()

Effect an 'authorize' gateway transaction. If successful, the transaction state will be set to 'active' and the authorization history will be stored in our records.

Return value

string the recommended transaction state after this action. Possible states are listed in $pay_transaction->states().

File

includes/handlers/pay_method_gateway.inc, line 33
The base class for credit card payment activities.

Class

pay_method_gateway
@file The base class for credit card payment activities.

Code

function authorize_action() {

  // Call execute, which runs the gateway interactions.
  $result = $this
    ->execute();

  // We can't proceed if there's an error, so return 'canceled'.
  return $result ? 'active' : 'canceled';
}