大通支付网关 [英] chase payment gateway

查看:103
本文介绍了大通支付网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当我尝试连接到网关时,出现以下消息:

Hi,
when i am trying to connect to the gateway i am getting the folowing msg:

System.Web.UI.HtmlControls.HtmlGenericControl

<html><head><title>302 Moved Temporarily</title></head> <body bgcolor="#FFFFFF"> <p>This document you requested has moved temporarily.</p> <p>It's now at <a href="https://securevar.paymentech.com/manager/">https://securevar.paymentech.com/manager/</a>.</p> </body></html


我的示例测试代码如下:


My sample test code is as follows:

public partial class chasegatrewaytest : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        string requestUrl = null;
        requestUrl = "https://securevar.paymentech.com/manager";

        HttpWebRequest WebRequestObject = null;
        StreamReader sr = null;
        HttpWebResponse WebResponseObject = null;
        StreamWriter swr = null;

        try
        {
            WebRequestObject = (HttpWebRequest)WebRequest.Create(requestUrl);
            WebRequestObject.Method = "POST";
            WebRequestObject.ContentType = "XML";
            WebRequestObject.AllowAutoRedirect = false;
            WebRequestObject.Timeout = 10000;

            string post = "<?xml version='1.0' encoding='UTF-8'?>";
post=post+"<Request>";
post=post+"<NewOrder>";
post=post+"<OrbitalConnectionUsername>txxx</OrbitalConnectionUsername>";
post=post+"<OrbitalConnectionPassword>txxxxx</OrbitalConnectionPassword>";
post=post+"<IndustryType>EC</IndustryType>";
post=post+"<MessageType>AC</MessageType>";
post=post+"<BIN>000001</BIN>";
post=post+"<MerchantID>028658</MerchantID>";
post=post+"<TerminalID>001</TerminalID>";
post=post+"<CardBrand></CardBrand>";
post = post + "<AccountNum>4444424444444440</AccountNum>";
post=post+"<Exp>0112</Exp>";
post=post+"<CurrencyCode>840</CurrencyCode>";
post=post+"<CurrencyExponent>2</CurrencyExponent>";
post = post + "<OrderID>000567</OrderID>";
post=post+"<Amount>50</Amount>";
post=post+"</NewOrder>";
post=post+"</Request>";
//WebRequestObject.SendChunked = true;
//WebRequestObject.TransferEncoding = "text";
WebRequestObject.KeepAlive = true;

            //string post = "<?xml version='1.0' encoding='utf-8' ?>\r\n<?qbxml version='6.0'?> \r\n<QBXML> \r\n<SignonMsgsRq> \r\n<SignonDesktopRq> \r\n<ClientDateTime>%%CLIENT_DATE_TIME%%</ClientDateTime> \r\n<ApplicationLogin>mqsubscribe.</ApplicationLogin> \r\n<ConnectionTicket>TGT-104-yKwSbsN7iFupkSw4dLnM3g</ConnectionTicket> \r\n<Language>English</Language> \r\n<AppID>154249935</AppID> \r\n<AppVer>1</AppVer> \r\n</SignonDesktopRq> \r\n</SignonMsgsRq> \r\n<QBXMLMsgsRq onError='continueOnError'><JournalEntryAddRq requestID='48'><JournalEntryAdd><TxnDate>2009-09-30</TxnDate><RefNumber>48</RefNumber><JournalDebitLine><AccountRef><FullName>Accounts Receivable</FullName></AccountRef><Amount>4396.00</Amount><Memo>BILL</Memo><EntityRef><FullName>Mohan</FullName></EntityRef></JournalDebitLine><JournalDebitLine><AccountRef><FullName>Sales tax payable</FullName></AccountRef><Amount>9.00</Amount><Memo>BILL</Memo></JournalDebitLine><JournalCreditLine><AccountRef><FullName>MqTaxAccount</FullName></AccountRef><Amount>450.00</Amount><Memo>BILL</Memo></JournalCreditLine><JournalCreditLine><AccountRef><FullName>Sales tax payable</FullName></AccountRef><Amount>3955.00</Amount><Memo>BILL</Memo></JournalCreditLine>\r\n</JournalEntryAdd>\r\n</JournalEntryAddRq>\r\n</QBXMLMsgsRq> \r\n</QBXML>";
            //post = post.Replace("%%CLIENT_DATE_TIME%%", DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss"));
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(post);
            post = xmlDoc.InnerXml;
            WebRequestObject.ContentLength = post.Length;
            swr = new StreamWriter(WebRequestObject.GetRequestStream());
            swr.Write(post);
            swr.Close();
            WebResponseObject = (HttpWebResponse)WebRequestObject.GetResponse();
            sr = new StreamReader(WebResponseObject.GetResponseStream());
            string Results = sr.ReadToEnd();
            //XmlDocument xmldoc1 = new XmlDocument();
            //string status = string.Empty;
            // xmldoc1.Load(sr.ReadToEnd());

            customers.InnerText = Results;
            Response.Write(customers);



}
是否想在我的代码或测试站点中知道问题?



}
Wanted to know the problem in my code or else in the testing site?

推荐答案


尝试更改
requestUrl ="https://securevar.paymentech.com/manager";


requestUrl ="https://securevar.paymentech.com/manager/";

这应该可行,因为您将获得302重定向,问题是

和您的帖子网址
Hi
try changing
requestUrl = "https://securevar.paymentech.com/manager";

to
requestUrl = "https://securevar.paymentech.com/manager/";

this should work, as you are getting 302 redirect the problem is

with your post URL


这篇关于大通支付网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆