Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
when i am trying to connect to the gateway i am getting the folowing msg:
XML
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:
XML
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?
Posted

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900