Postilion eSocket.POS结构化xml数据标签

时间:2016-06-09 17:05:55

标签: c# xml position

美好的一天。 我希望有人能帮助我。我们被要求在进行电子卡支付时更改我们的POS系统。我们被要求通过结构化的xml向eSocket.POS提供事务的唯一GUID。我们生成的用于创建请求的当前xml正常工作,但只要我将结构化的xml元素包含到结尾,我就会在执行请求时收到错误。

这是我要添加的行

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

这是正在生成的原始xml

<?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>

这就是我追加的(产生错误)

<?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>

我收到的错误如下:

<?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>

我从以前的开发人员那里开始进行POS开发,并且没有经历过eSocket.POS。

如果有人能帮助我,我将非常感激。

2 个答案:

答案 0 :(得分:1)

美好的一天。 我已经通过查看.dtd文件找到了xml的预期格式。对于任何可能感兴趣的人,这是必需的格式。

<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>

答案 1 :(得分:0)

我已经开发了一个示例应用程序,解释了使用eScoket.POS针垫的过程。请在下面找到链接。您只需要替换TerminalId和您的主机/端口即可使其工作。

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