public function testMD5FingerprintIsCalculatedCorrectlyWithAnUnstructuredRemittanceIdentifier()
 {
     $transferMsgDetails = new TransferMsgDetails("http://10.18.70.8:7001/vendorconfirmation", "http://10.18.70.8:7001/transactionok?danke.asp", "http://10.18.70.8:7001/transactionnok?fehler.asp");
     $transferMsgDetails->TargetWindowNok = $transferMsgDetails->TargetWindowOk = 'Mustershop';
     $secret = 'topSecret';
     $date = '2007-03-16';
     $referenceIdentifier = '1234567890ABCDEFG';
     $beneficiaryAccountIdentifier = 'AT611904300234573201';
     $instructedAmount = 15000;
     $amountCurrencyIdentifier = 'EUR';
     $userId = 'AKLJS231534';
     $unstructuredRemittanceIdentifier = 'unstructuredRemittanceIdentifier';
     $data = new TransferInitiatorDetails($userId, $secret, 'GAWIATW1XXX', 'Max Mustermann', $beneficiaryAccountIdentifier, $referenceIdentifier, $instructedAmount, $transferMsgDetails, $date);
     $data->UnstructuredRemittanceIdentifier = $unstructuredRemittanceIdentifier;
     $actual = $data->GetMD5Fingerprint();
     $string = $secret . $date . $referenceIdentifier . $beneficiaryAccountIdentifier . $unstructuredRemittanceIdentifier . FormatMonetaryXsdDecimal($instructedAmount) . $amountCurrencyIdentifier . $userId;
     $expected = md5($string);
     $this->assertEquals($expected, $actual, 'Expected MD5 Fingerprint to be equal');
 }
 /**
  * Sends the given TransferInitiatorDetails to the Scheme Operator
  * @param TransferInitiatorDetails $transferInitiatorDetails
  * @param string $targetUrl url with preselected bank identifier
  * @throws XmlValidationException when the returned BankResponseDetails does not validate against XSD
  * @throws \UnexpectedValueException when using security suffix without security seed
  * @return string BankResponseDetails
  */
 public function SendTransferInitiatorDetails($transferInitiatorDetails, $targetUrl = null)
 {
     if ($transferInitiatorDetails->RemittanceIdentifier != null) {
         $transferInitiatorDetails->RemittanceIdentifier = $this->AppendHash($transferInitiatorDetails->RemittanceIdentifier);
     }
     if ($transferInitiatorDetails->UnstructuredRemittanceIdentifier != null) {
         $transferInitiatorDetails->UnstructuredRemittanceIdentifier = $this->AppendHash($transferInitiatorDetails->UnstructuredRemittanceIdentifier);
     }
     if ($targetUrl == null) {
         $targetUrl = 'https://routing.eps.or.at/appl/epsSO/transinit/eps/v2_5';
     }
     $data = $transferInitiatorDetails->GetSimpleXml();
     $xmlData = $data->asXML();
     $response = $this->PostUrl($targetUrl, $xmlData, 'Send payment order');
     XmlValidator::ValidateEpsProtocol($response);
     return $response;
 }