You are here

function PaymentMethodControllerUnavailable::validate in Payment 7

Validate a payment against a payment method and this controller. Don't call directly. Use PaymentMethod::validate() instead.

Parameters

Payment $payment:

PaymentMethod $payment_method:

boolean $strict: Whether to validate everything a payment method needs or to validate the most important things only. Useful when finding available payment methods, for instance, which does not require unimportant things to be a 100% valid.

Throws

PaymentValidationException

Overrides PaymentMethodController::validate

See also

PaymentMethod::validate()

File

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

Class

PaymentMethodControllerUnavailable
A payment method controller that essentially disables payment methods.

Code

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