You are here

public static function PayPalPaymentPPSPaymentMethodController::PayPalValidateIPNVariables in PayPal for Payment 7

Validates IPN message variables for a payment.

Parameters

Payment $payment:

array $ipn_variables:

Return value

bool Whether the IPN variables are valid.

Overrides PayPalPaymentIPNPaymentMethodControllerInterface::PayPalValidateIPNVariables

File

paypal_payment_pps/includes/PayPalPaymentPPSPaymentMethodController.inc, line 80

Class

PayPalPaymentPPSPaymentMethodController
A PayPal Payments Standard payment method.

Code

public static function PayPalValidateIPNVariables(Payment $payment, array $ipn_variables) {

  // PayPal treats email addresses case-insensitively and returns them in
  // lowercase in $ipn_variables['business']. Therefore we must perform
  // a case-insensitive comparison.
  return strtolower($ipn_variables['business']) == strtolower($payment->method->controller_data['email_address']);
}