Postilion eSocket.POS Structured xml data Tags

假如想象 提交于 2019-12-12 05:37:58

问题


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.


回答1:


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>



回答2:


I have developed a sample application explaining the process to work with eScoket.POS pin pad Please find find the link below. You just need to replace TerminalId and host/port of your to make it work.

https://www.dropbox.com/s/215qpjbah0z87uw/Pinpad_Source.zip?dl=0



来源:https://stackoverflow.com/questions/37732201/postilion-esocket-pos-structured-xml-data-tags

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!