/** * Tests conversion of {@link PaymentRequest} from XML file for mobile-auth payment types. * */ public function testPaymentRequestXmlFromFileMobileAuth() { $path = SampleXmlValidationUtils::MOBILE_AUTH_PAYMENT_REQUEST_XML_PATH; $prefix = __DIR__ . '/../../../resources'; $xml = file_get_contents($prefix . $path); //unmarshal back to response /* @var ThreeDSecureRequest $fromXmlResponse */ $fromXmlRequest = new PaymentRequest(); $fromXmlRequest = $fromXmlRequest->fromXml($xml); SampleXmlValidationUtils::checkUnmarshalledPaymentRequest($fromXmlRequest, $this); }
/** * Tests conversion of {@link PaymentRequest} from XML file. */ public function testPaymentRequestXmlFromFile() { $path = SampleXmlValidationUtils::PAYMENT_REQUEST_XML_PATH; $prefix = __DIR__ . '/../../../resources'; $xml = file_get_contents($prefix . $path); /* @var PaymentRequest $fromXmlRequest */ $fromXmlRequest = new PaymentRequest(); $fromXmlRequest = $fromXmlRequest->fromXml($xml); SampleXmlValidationUtils::checkUnmarshalledPaymentRequest($fromXmlRequest, $this); }