You are here

class PaymentMethodUnavailable in Payment 7

A payment method that essentially disables payments.

This is a 'placeholder' method that returns defaults and doesn't really do anything else. It is used when no working payment method is available, so other modules don't have to check for that.

Hierarchy

Expanded class hierarchy of PaymentMethodUnavailable

2 string references to 'PaymentMethodUnavailable'
PaymentTestUnavailableWebTestCase::testUnavailable in tests/payment_test/tests/PaymentTestUnavailableWebTestCase.test
Test unavailable payment methods and payment method controllers.
payment_method_name_exists in ./payment.ui.inc

File

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

View source
class PaymentMethodUnavailable extends PaymentMethod {
  public $enabled = FALSE;
  public $name = 'payment_method_unavailable';
  public $module = 'payment';

  // Use 0, so the payment method can be used for payments, but will never
  // collide with existing payment methods.
  public $pmid = 0;

  /**
   * {@inheritdoc}
   */
  function __construct() {
    $this->title_specific = $this->title_generic = t('Unavailable');
    $this->controller = payment_method_controller_load('PaymentMethodControllerUnavailable');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentMethod::$controller public property The payment method controller this merchant uses.
PaymentMethod::$controller_data public property Information about this payment method that is specific to its controller.
PaymentMethod::$status public property One of Entity API's ENTITY_* constants for exportable entities.
PaymentMethod::$title_generic public property The generic human-readable title, e.g. "Paypal".
PaymentMethod::$title_specific public property The specific human-readable title, e.g. "Paypal WPS".
PaymentMethod::$uid public property The UID of the user this payment method belongs to.
PaymentMethod::validate function Validate a payment against this payment method.
PaymentMethodUnavailable::$enabled public property Whether this payment method is enabled and can be used. Overrides PaymentMethod::$enabled
PaymentMethodUnavailable::$module public property The machine name of the module that created this payment method. Overrides PaymentMethod::$module
PaymentMethodUnavailable::$name public property The entity's unique machine name. Overrides PaymentMethod::$name
PaymentMethodUnavailable::$pmid public property The unique internal ID. Overrides PaymentMethod::$pmid
PaymentMethodUnavailable::__construct function Overrides PaymentMethod::__construct