You are here

class PaymentMethodControllerUnavailable in Payment 7

A payment method controller that essentially disables payment methods.

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

Hierarchy

Expanded class hierarchy of PaymentMethodControllerUnavailable

9 string references to 'PaymentMethodControllerUnavailable'
PaymentMethodEntityController::attachLoad in ./payment.classes.inc
Overridden.
PaymentMethodUnavailable::__construct in ./payment.classes.inc
PaymentreferenceTestQueueWebTestCase::testQueueCRUD in modules/paymentreference/tests/paymentreference_test/tests/PaymentreferenceTestQueueWebTestCase.test
PaymentreferenceTestQueueWebTestCase::testQueueFieldImplementation in modules/paymentreference/tests/paymentreference_test/tests/PaymentreferenceTestQueueWebTestCase.test
PaymentTestEntityCrudWebTestCase::testPaymentCRUD in tests/payment_test/tests/PaymentTestEntityCrudWebTestCase.test
Test payment CRUD functionality.

... See full list

File

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

View source
class PaymentMethodControllerUnavailable extends PaymentMethodController {

  /**
   * {@inheritdoc}
   */
  function __construct() {
    $this->title = t('Unavailable');
  }

  /**
   * {@inheritdoc}
   */
  function execute(Payment $payment) {
    $payment
      ->setStatus(new PaymentStatusItem(PAYMENT_STATUS_UNKNOWN));
  }

  /**
   * {@inheritdoc}
   */
  function validate(Payment $payment, PaymentMethod $payment_method, $strict) {
    throw new PaymentValidationException(t('This payment method type is unavailable.'));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentMethodController::$controller_data_defaults public property Default values for the controller_data property of a PaymentMethod that uses this controller. 1
PaymentMethodController::$currencies public property An array with ISO 4217 currency codes that this controller supports.
PaymentMethodController::$description public property A human-readable plain text description of this payment method controller.
PaymentMethodController::$name public property The machine name.
PaymentMethodController::$payment_configuration_form_elements_callback public property The function name of the payment configuration form elements. 1
PaymentMethodController::$payment_method_configuration_form_elements_callback public property The function name of the payment method configuration form elements. 1
PaymentMethodController::$title public property The human-readable plain text title.
PaymentMethodController::descendants static function Returns an array with the names of all available payment method controllers that inherit of this one.
PaymentMethodControllerUnavailable::execute function Execute a payment. Overrides PaymentMethodController::execute
PaymentMethodControllerUnavailable::validate function Validate a payment against a payment method and this controller. Don't call directly. Use PaymentMethod::validate() instead. Overrides PaymentMethodController::validate
PaymentMethodControllerUnavailable::__construct function