function hook_payment_validate in Payment 7
Validate a payment against a payment method.
This hook may be called multiple times for the exact same payment, but for different payment methods, for example when looking for payment methods that are capable of processing a payment.
Parameters
Payment $payment: $payment->method contains the method currently configured, but NOT the method that $payment should be tested against, which is $payment_method.
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.
Return value
boolean Whether the payment and/or the payment method are valid.
1 function implements hook_payment_validate()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- payment_test_payment_validate in tests/
payment_test/ payment_test.module - Implements hook_payment_validate().
1 invocation of hook_payment_validate()
- PaymentMethod::validate in ./
payment.classes.inc - Validate a payment against this payment method.
File
- ./
payment.api.php, line 182 - Hook documentation.
Code
function hook_payment_validate(Payment $payment, PaymentMethod $payment_method, $strict) {
}