简体   繁体   English

错误代码67 ISO8583

[英]Error Code 67 ISO8583

So now I'm building a ISO8583 Payment Gateway application. 因此,现在我正在构建一个ISO8583 Payment Gateway应用程序。 This application is a client-server application that can act as a client or server. 此应用程序是可以充当客户端或服务器的客户端-服务器应用程序。 In this case, I'm handling the client side of the application. 在这种情况下,我正在处理应用程序的客户端。

At first, I connected the (client)app to a external server. 首先,我将(client)app连接到外部服务器。 I was sending inquiry message and it ran well (returning success message). 我正在发送查询消息,并且运行良好(返回成功消息)。 Then, i'm trying to run this app as both client and server (run 2 apps and set my ip as ip host), one as client and the other one as a server. 然后,我试图同时作为客户端和服务器运行该应用程序(运行2个应用程序并将我的ip设置为ip主机),一个作为客户端,另一个作为服务器。 I'm sending inquiry message and it keeps returning response code 67 (other error). 我正在发送查询消息,并且一直返回响应代码67(其他错误)。 Meanwhile it's succeed when I run the app as client only. 同时,当我仅以客户端身份运行该应用程序时,它就成功了。

I don't know if it helps but here's the inquiry method 我不知道是否有帮助,但这是查询方法

 /// <summary>
    /// Send Inquiry Message
    /// </summary>
    private void SendInquiryMessage()
    {
        var requestMsg = new Iso8583Message(200);
        DateTime transmissionDate = DateTime.Now;
        requestMsg.Fields.Add(7, string.Format("{0}{1}",
            string.Format("{0:00}{1:00}", transmissionDate.Month, transmissionDate.Day),
            string.Format("{0:00}{1:00}{2:00}", transmissionDate.Hour,
                transmissionDate.Minute, transmissionDate.Second)));
        requestMsg.Fields.Add(11, _sequencer.Increment().ToString());
        requestMsg.Fields.Add((int)ISO8583ProtocolFields.PROCESSING_CODE, "341019");
        requestMsg.Fields.Add((int)ISO8583ProtocolFields.ADDITIONAL_DATA_61, "5271720012002010802012");

        #region Send 0200
        SendRequestHandlerCtrl sndCtrl = _client.SendExpectingResponse(requestMsg, 1000, true, null);
        sndCtrl.WaitCompletion(); // Wait send completion.
        if (!sndCtrl.Successful)
        {
            Console.WriteLine(string.Format("Client: unsuccessful request # {0} ({1}.",
                _sequencer.CurrentValue(), sndCtrl.Message));
            if (sndCtrl.Error != null)
                Console.WriteLine(sndCtrl.Error);
        }
        else
        {
            sndCtrl.Request.WaitResponse();

            if (sndCtrl.Request.IsExpired)
                _expiredRequests++;
            else
                _requestsCnt++;
        }

        latestInquiryMessage = sndCtrl.Request.ReceivedMessage as Iso8583Message;

        Console.WriteLine(latestInquiryMessage.Fields[39].Value);

        #endregion

    }

Anyone know what the problem is? 有人知道是什么问题吗? What I could possibly miss? 我可能会错过什么?

Thank you! 谢谢!

I don't know which specific ISO-8583 implementation you are attempting to write to but a couple guesses based on what I do see or do not see and what your actual question is. 我不知道您要尝试写入哪个特定的ISO-8583实现,但是基于我看到或未看到的内容以及您的实际问题是几个猜测。 It seems especially odd that it works when it communicating with the remote server as client but not as both. 当它与作为客户端但不同时作为两者的远程服务器通信时,它可以工作似乎特别奇怪。 Where is your communications configuration? 您的通讯配置在哪里?

This points to your TCP/IP configuration and my guess is that you are attempting to listen and communicate on perhaps the same port so are not truly completing the TCP/IP handshake. 这指向您的TCP / IP配置,我的猜测是您正在尝试在相同的端口上侦听和通信,因此并没有真正完成TCP / IP握手。 While I believe you technically can listen on a port and communicate out it for a different process I think it unnecessarily complicates things. 从技术上来说,我相信您可以侦听端口并针对不同的进程进行通信,但我认为这不必要地使事情变得复杂。

So my guess is that what is happening and is your problem is that you are attempting to communicate with yourself, are maybe not getting fully connected and instead of saying "91 - Issuer Not Available" or "96 - System error" it is giving you the odd "67 other error" as it may not have been able to actually send it. 因此,我的猜测是,正在发生的事情是您的问题,您正在尝试与自己进行通信,可能未完全连接,而是说“ 91-Issuer Not Available”或“ 96-System error”奇怪的“其他67个错误”,因为它实际上可能无法发送。

Do you have trace, or have you watched the connectivity with netstat -a 1 or even better Wireshark if you do not have trace to verify that you are getting fully established? 您是否有跟踪,或者如果没有跟踪来验证自己已完全建立,是否已经看过netstat -a 1或更好的Wireshark的连接?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM