You are here

public static function PayPalPaymentIPNController::load in PayPal for Payment 7

Loads an IPN.

Parameters

int $psiid: The payment status item ID of the IPN to load.

Return value

PayPalPaymentIPN|false

2 calls to PayPalPaymentIPNController::load()
PayPalPaymentIPNControllerTest::testLoad in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests load().
PayPalPaymentIPNListener::testIPNListener in paypal_payment_ipn/tests/PayPalPaymentIPNListener.test
Tests the IPN listener.

File

paypal_payment_ipn/includes/PayPalPaymentIPNController.inc, line 32

Class

PayPalPaymentIPNController
Provides IPN functionality.

Code

public static function load($psiid) {
  $ipn_data = db_select('paypal_payment_ipn', 'mpi')
    ->fields('mpi')
    ->condition('psiid', $psiid)
    ->execute()
    ->fetchAssoc();
  if ($ipn_data) {
    return new PayPalPaymentIPN($ipn_data);
  }
  return FALSE;
}