Search code examples
c#xmlposition

Postilion eSocket.POS Structured xml data Tags


Good day. i am hoping that someone could perhaps help me. We have been requested to make changes to our POS system when doing Electronic card payments. we have been requested to include a unique GUID for the transaction via structured xml to eSocket.POS. the current xml that we generate to create the request works correctly, but as soon as i include the structured xml element to the end i receive errors when doing the request.

this is the line i am adding

<Esp:StructuredData Name=\"TenderDetailGUID\" Value=\"BE6924AC-1379-49F8-9BE7-7A54821EF227\" ></Esp:StructuredData>

this is the original xml being generated which works

<?xml version=\"1.0\" encoding=\"utf-8\"?>
 <Esp:Interface Version=\"1.0\" xmlns:Esp=\"http://www.mosaicsoftware.com/Postilion/eSocket.POS/\">
 <Esp:Transaction PosOperatorId=\"  001\" RetrievalRefNr=\"0001\" TerminalId=\"0001\" TransactionAmount=\"10\" TransactionId=\"001\" Type=\"PURCHASE\" ></Esp:Transaction>
 </Esp:Interface>

This is what i am appending (which produce the error)

<?xml version=\"1.0\" encoding=\"utf-8\"?>
 <Esp:Interface Version=\"1.0\" xmlns:Esp=\"http://www.mosaicsoftware.com/Postilion/eSocket.POS/\">
 <Esp:Transaction PosOperatorId=\"  001\" RetrievalRefNr=\"001\" TerminalId=\"001\" TransactionAmount=\"10\" TransactionId=\"001\" Type=\"PURCHASE\" ></Esp:Transaction>
 <Esp:StructuredData Name=\"TenderDetailGUID\" Value=\"BE6924AC-1379-49F8-9BE7-7A54821EF227\" ></Esp:StructuredData>
 </Esp:Interface>

The errors i am receiving are as follows:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<Esp:Interface Version=\"1.0\" xmlns:Esp=\"http://www.mosaicsoftware.com/Postilion/eSocket.POS/\"><Esp:Error ActionCode=\"DECLINE\" ResponseCode=\"30\" MessageReasonCode=\"9791\" Description=\"The content of element type &quot;Esp:Interface&quot; must match &quot;(Esp:Admin|Esp:Error|Esp:Transaction|Esp:Inquiry|Esp:Check|Esp:Merchandise|Esp:Callback|Esp:Event|Esp:Reconciliation|Esp:Network)&quot;.\" /></Esp:Interface>

i have taken this POS development over from a previous developer and have no eSocket.POS experiencing.

i would really appreciate it if any one could help me with this.


Solution

  • Good day. i have figured it out by looking at the.dtd file for the expected format of the xml. for anyone who may be interested, this is the required format.

    <Transaction TerminalId="" TransactionId="" Type="PURCHASE" MessageType="AUTH" ForceOnline="TRUE" Reversal="TRUE" DateTime="" LocalTime="" LocalDate="" ExtendedTransactionType="" AmountTransactionFee="" CardVerificationResult="" BusinessDate="" RetrievalRefNr="" PosOperatorId="" CardNumber="" StartDate="" ExpiryDate="" CardSequenceNumber="" Cvv2="" Track1="" Track2="" Track3="" PanEntryMode="" PosCondition="" TransactionAmount="" CashbackAmount="" CurrencyCode="" ExtendedPaymentPeriod="" Account="" PinData="" PinKeySequenceNr="" FinalAmount="" MessageReasonCode="" ResponseCode="" PrivateData="" AuthorizationNumber="" CardholderAddress="" PostalCode="" SignatureData="" SignatureFormat="" ChainedTransactionId="" ActionCode="APPROVE" AuthorizingAgent="" AuthorizationProfile="" ServiceRestrictionCode="" CardProductName="" CardholderName="" MerchantId="" ReferralTelephone="" CardholderInformation="" SignatureRequired="TRUE" AddressVerificationResult="" EmvAmount="" EmvAmountOther="" EmvApplicationIdentifier="" EmvApplicationInterchangeProfile="" EmvApplicationLabel="" EmvApplicationPreferredName="" EmvApplicationTransactionCounter="" EmvApplicationUsageControl="" EmvApplicationVersionNumber="" EmvAuthorizationResponseCode="" EmvCryptogram="" EmvCryptogramInformationData="" EmvCvmList="" EmvCvmResults="" EmvInterfaceDeviceSerialNumber="" EmvIssuerActionCodeDefault="" EmvIssuerActionCodeDenial="" EmvIssuerActionCodeOnline="" EmvIssuerApplicationData="" EmvIssuerCodeTableIndex="" EmvIssuerScriptResults="" EmvTerminalApplicationVersionNumber="" EmvTerminalCapabilities="" EmvTerminalCountryCode="" EmvTerminalType="" EmvTerminalVerificationResult="" EmvTransactionCategoryCode="" EmvTransactionCurrencyCode="" EmvTransactionDate="" EmvTransactionSequenceCounter="" EmvTransactionStatusInformation="" EmvTransactionType="" EmvUnpredictableNumber="" FallbackType="" RPS="">
        <Esp:PurchasingCardData/>
        <Esp:Balance/>
        <Esp:PosStructuredData/>
        <Esp:StructuredData/>
    </Transaction>