You are here

function pay_method_direct::set_direct_pending in Pay 7

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

Store values submitted by a form function, etc. This will allow us to construct a request to the gateway processor when necessary.

2 calls to pay_method_direct::set_direct_pending()
pay_method_direct::authorize_action in includes/handlers/pay_method_direct.inc
Create a stub method to ensure that do_action('authorize') is executed. If your subclass wants to change, store, or fixup data before it's sent to the gateway, do it by overriding this method.
pay_method_direct::complete_action in includes/handlers/pay_method_direct.inc
Create a stub method to ensure that do_action('complete') is executed. If your subclass wants to change, store, or fixup data before it's sent to the gateway, do it by overriding this method.

File

includes/handlers/pay_method_direct.inc, line 97
The base class for 'direct' payment activities, where payments are collected on third-party sites such as PayPal, and the responses are returned to Drupal on a URL callback.

Class

pay_method_direct
@file The base class for 'direct' payment activities, where payments are collected on third-party sites such as PayPal, and the responses are returned to Drupal on a URL callback.

Code

function set_direct_pending($values = array()) {
  $this->activity->data = $values;
  $this->activity->result = TRUE;

  // Store the current activity for response handling, but store 'pending'.
  $this->activity->data['action'] = $this->activity->action;
  $this->activity->action = 'pending';

  // The direct handler may hardcode its payment_type.
  if (isset($this->payment_type)) {
    $this->activity->payment_type = $this->payment_type;
  }
}