You are here

public function PayPalPaymentIPNWebTestCase::mockIPNVariables in PayPal for Payment 7

Creates IPN variables for a payment.

Parameters

integer $pid: THE PID of the Payment the IPN is for.

bool $valid: Whether the IPN needs to be valid.

Return value

array

6 calls to PayPalPaymentIPNWebTestCase::mockIPNVariables()
PayPalPaymentIPNControllerTest::testAcknowledge in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests acknowledge().
PayPalPaymentIPNControllerTest::testConvertStatus in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests convertStatus().
PayPalPaymentIPNControllerTest::testProcess in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Test process().
PayPalPaymentIPNControllerTest::testSave in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests save().
PayPalPaymentIPNControllerTest::testValidate in paypal_payment_ipn/tests/PayPalPaymentIPNControllerTest.test
Tests validate().

... See full list

File

paypal_payment_ipn/tests/PayPalPaymentIPNWebTestCase.test, line 23
Contains \PayPalPaymentIPNWebTestCase.

Class

PayPalPaymentIPNWebTestCase
Contains testing helpers.

Code

public function mockIPNVariables($pid, $valid = TRUE) {
  return array(
    'mc_gross' => '19.95',
    'protection_eligibility' => 'Eligible',
    'address_status' => 'confirmed',
    'payer_id' => 'LPLWNMTBWMFAY',
    'tax' => '0.00',
    'address_street' => '1 Main St',
    'payment_status' => 'Completed',
    'txn_id' => $valid ? 'TXN_ID_VERIFIED' : $this
      ->randomName(),
    'invoice' => PayPalPaymentIPNController::invoiceID($pid),
  );
}