/** * Check all fields match expected values. * * @param PaymentResponse $fromXmlResponse * @param PHPUnit_Framework_TestCase $testCase */ public static function checkUnmarshalledPaymentResponseWithFraudFilterNoRules(PaymentResponse $fromXmlResponse, PHPUnit_Framework_TestCase $testCase, $ignoreTssChecks = false) { $fraudFilter = $fromXmlResponse->getFraudFilter(); $testCase->assertEquals(FraudFilterMode::ACTIVE, $fraudFilter->getMode()); $testCase->assertEquals(FraudFilterResult::NOT_EXECUTED, $fraudFilter->getResult()); $testCase->assertEmpty($fraudFilter->getRules()); $testCase->assertEquals(self::FRAUD_FILTER_TIMESTAMP, $fromXmlResponse->getTimeStamp()); $testCase->assertEquals(self::FRAUD_FILTER_MERCHANT_ID, $fromXmlResponse->getMerchantId()); $testCase->assertEquals(self::FRAUD_FILTER_ACCOUNT, $fromXmlResponse->getAccount()); $testCase->assertEquals(self::FRAUD_FILTER_ORDER_ID, $fromXmlResponse->getOrderId()); $testCase->assertEquals(self::FRAUD_FILTER_AUTH_CODE, $fromXmlResponse->getAuthCode()); $testCase->assertEquals(self::FRAUD_FILTER_RESULTT, $fromXmlResponse->getResult()); $testCase->assertEquals(self::FRAUD_FILTER_CVN_RESULT, $fromXmlResponse->getCvnResult()); $testCase->assertEquals(self::FRAUD_FILTER_AVS_POST, $fromXmlResponse->getAvsPostcodeResponse()); $testCase->assertEquals(self::FRAUD_FILTER_AVS_ADD, $fromXmlResponse->getAvsAddressResponse()); $testCase->assertEquals(self::FRAUD_FILTER_BATCH_ID, $fromXmlResponse->getBatchId()); $testCase->assertEquals(self::FRAUD_FILTER_MESSAGE, $fromXmlResponse->getMessage()); $testCase->assertEquals(self::FRAUD_FILTER_PAS_REF, $fromXmlResponse->getPaymentsReference()); $testCase->assertEquals(self::FRAUD_FILTER_TIME_TAKEN, $fromXmlResponse->getTimeTaken()); $testCase->assertEquals(self::FRAUD_FILTER_AUTH_TIME, $fromXmlResponse->getAuthTimeTaken()); $testCase->assertEquals(self::FRAUD_FILTER_HASH, $fromXmlResponse->getHash()); } } SampleXmlValidationUtils::Init();