Beispiel #1
0
 private function validateAcquirerTransactionRequest(AcquirerTransactionRequest $input)
 {
     $length = preg_match('/[A-Z]{6,6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3,3}){0,1}/', $input->getIssuerID(), $matches);
     if ($length !== 1 || $matches[0] !== $input->getIssuerID()) {
         throw new ValidationException("Issuer.issuerID does not match format.");
     }
     $this->validateMerchant($input->getMerchant());
     $this->validateTransaction($input->getTransaction());
 }
Beispiel #2
0
 private function serializeAcquirerTransactionRequest(DOMElement $element, AcquirerTransactionRequest $request)
 {
     $item = $element->ownerDocument->createElement("Issuer");
     $item->appendChild(new DOMElement("issuerID", $request->getIssuerID()));
     $element->appendChild($item);
     $item = $element->ownerDocument->createElement("Merchant");
     $this->serializeMerchant($item, $request->getMerchant(), true);
     $element->appendChild($item);
     $item = $element->ownerDocument->createElement("Transaction");
     $this->serializeTransaction($item, $request->getTransaction());
     $element->appendChild($item);
 }