You are here

function payment_rules_condition_payment_status_is in Payment 7

Implements Rules condition callback: check whether a payment's status is one of the selected statuses.

Parameters

Payment $payment: The payment to check the condition for.

array $payment_statuses: An array with payment statuses.

Return value

boolean

File

./payment.rules.inc, line 346
Rules integration.

Code

function payment_rules_condition_payment_status_is(Payment $payment, array $payment_statuses) {
  return in_array($payment
    ->getStatus()->status, $payment_statuses);
}