Пример #1
0
            public override void OnAuthorization(AuthorizationContext filterContext)
            {
                base.OnAuthorization(filterContext);

                string realIP = new AllPay.ShareLib.Network().GetRemoteRealIP();

                if (ConfigService.BlockIp == true)
                {
                    if (!(realIP.StartsWith("172.16.30") || realIP.StartsWith("127.0.0.1")))
                    {
                        filterContext.Result = new HttpUnauthorizedResult();
                    }
                    else
                    {
                        filterContext.Result = null;
                    }

                }
                else {
                    filterContext.Result = null;
                }



            }
Пример #2
0
        //測試回傳給payment 財付通付款成功的動作
        public ActionResult TestTenpayReturn()
        {

            //string merchantId = "999999999";
            //string merchantTradeNo = "41047";           //payment的tradeID
            //string tradeNo = "20121202161509134918";    //payment center的tradeNo


            ////string relpyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/cnt/tenpay/result";
            ////string serverReplyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/srv/tenpay/result";

            //string relpyUrl = "https://payment.allpay.com.tw/bank/paymentcenter/cnt/tenpay/result";
            //string serverReplyUrl = "https://payment.allpay.com.tw/bank/paymentcenter/srv/tenpay/result";

            string merchantId = "2000132";
            string merchantTradeNo = "100051";           //payment的tradeID
            string tradeNo = "20131018144107463317";    //payment center的tradeNo
            string AesHashKey = "ejCk326UnaZWKisg";
            string AesHashIv = "q9jcZX8Ib9LM8wYk";
            string serverReplyUrl = "http://linda.sunup.net/test/pay_info.php";
            

            XmlDocument XML = new XmlDocument();
            XML.Load(HttpContext.Server.MapPath("~/App_Data/PaymentReceiveTenpay.xml"));

            //###取得XML的節點
            XmlElement eleMerchantID = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantID");
            XmlElement eleMerchantTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantTradeNo");
            XmlElement eleRtnCode = (XmlElement)XML.SelectSingleNode("Root/Data/RtnCode");
            XmlElement eleRtnMsg = (XmlElement)XML.SelectSingleNode("Root/Data/RtnMsg");
            XmlElement eleTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/TradeNo");
            XmlElement eleTradeDate = (XmlElement)XML.SelectSingleNode("Root/Data/TradeDate");
            XmlElement eleTradeAmount = (XmlElement)XML.SelectSingleNode("Root/Data/TradeAmount");
            XmlElement eleTenpayTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/TenpayTradeNo");
            XmlElement eleTimeStamp = (XmlElement)XML.SelectSingleNode("Root/Data/TimeStamp");

            //### 設定XML內容
            eleMerchantID.InnerText = merchantId;
            eleMerchantTradeNo.InnerText = merchantTradeNo;
            eleRtnCode.InnerText = "1";
            eleRtnMsg.InnerText = "success";
            eleTradeNo.InnerText = tradeNo;
            eleTradeDate.InnerText = "2013/10/18 23:24:00";
            eleTradeAmount.InnerText = "200.0";
            eleTenpayTradeNo.InnerText = "12141540012012120201";

            long epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            eleTimeStamp.InnerText = epoch.ToString();

            //### 將XML透過AES加密
            string XMLData = new AllPay.ShareLib.Crypt().AES_EnCrypt(AesHashKey, AesHashIv, XML.OuterXml);

            //先server端回傳
            string serverReponse = new AllPay.ShareLib.Network().FormPost(serverReplyUrl, "XMLData=" + XMLData, "", 0, 65001);

            //再client端回傳
            //string response = new AllPay.ShareLib.Network().FormPost(relpyUrl, "XMLData=" + XMLData, "", 0, 65001);
            //DoRequest(relpyUrl, XMLData);

            return null;
        }
Пример #3
0
        //測試回傳給payment 超商付款成功的動作
        public ActionResult TestCVSReturnToPayment()
        {

            string merchantId = "999999999";
            string merchantTradeNo = "13837";           //payment的tradeID(必改)
            string tradeNo = "20121018101322793733";    //payment center的tradeNo(可不改)
            string payDate = "2012-10-18 19:25:27";
            string payAmount = "30";
            string paymentNo = "GW121018919930";        //繳費代碼
            string payForm = "okmart";                  //繳費平台

            string AesHashKey = "fugvqTnG3ROx81MO";     //開發環境的key
            string AesHashIv = "WkSfnqIaHLbUMV5X";
            string serverReplyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/srv/cvs/result";
            
      

            XmlDocument xml = new XmlDocument();

            xml.Load(HttpContext.Server.MapPath("~/App_Data/ReturnCVSPaidTrade.xml"));

            XmlElement eleMerchantID = (XmlElement)xml.SelectSingleNode("Root/Data/MerchantID");
            XmlElement eleMerchantTradeNo = (XmlElement)xml.SelectSingleNode("Root/Data/MerchantTradeNo");
            XmlElement eleRtnCode = (XmlElement)xml.SelectSingleNode("Root/Data/RtnCode");
            XmlElement eleRtnMsg = (XmlElement)xml.SelectSingleNode("Root/Data/RtnMsg");
            XmlElement eleTradeNo = (XmlElement)xml.SelectSingleNode("Root/Data/TradeNo");
            XmlElement elePayDate = (XmlElement)xml.SelectSingleNode("Root/Data/PayDate");
            XmlElement eleTradeAmount = (XmlElement)xml.SelectSingleNode("Root/Data/TradeAmount");
            XmlElement elePaymentNo = (XmlElement)xml.SelectSingleNode("Root/Data/PaymentNo");
            XmlElement elePayFrom = (XmlElement)xml.SelectSingleNode("Root/Data/PayFrom");

            //### 設定XML內容
            eleMerchantID.InnerText = merchantId;
            eleMerchantTradeNo.InnerText = merchantTradeNo;
            eleRtnCode.InnerText = "1";
            eleRtnMsg.InnerText = "Succeeded";
            eleTradeNo.InnerText = tradeNo;
            elePayDate.InnerText = payDate;
            eleTradeAmount.InnerText = payAmount;
            elePaymentNo.InnerText = paymentNo;
            elePayFrom.InnerText = payForm;

            //long epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            //eleTimeStamp.InnerText = epoch.ToString();

            ////### 將XML透過AES加密
            string XMLData = new AllPay.ShareLib.Crypt().AES_EnCrypt(AesHashKey, AesHashIv, xml.OuterXml);

            //server端回傳
            string serverReponse = new AllPay.ShareLib.Network().FormPost(serverReplyUrl, "XMLData=" + XMLData, "", 0, 65001);

            ViewBag.Reponse = serverReponse;
            ViewBag.Result = false;

            if (serverReponse.IndexOf("1|OK") > -1)
            {
                ViewBag.Result = true;
            }

            return View();

        }
Пример #4
0
        //測試回傳給payment 支付寶付款成功的動作
        public ActionResult TestAlipayReturn()
        {


            string merchantTradeNo = "42244";           //payment的tradeID
            string tradeNo = "20121212170719279614";    //payment center的tradeNo
            string tradeAmount = "350";

            string merchantId = "999999999";
            string AesHashKey = "fugvqTnG3ROx81MO";
            string AesHashIv = "WkSfnqIaHLbUMV5X";
            string relpyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/cnt/alipay/result";
            string serverReplyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/srv/alipay/result";

      
            XmlDocument XML = new XmlDocument();
            XML.Load(HttpContext.Server.MapPath("~/App_Data/PaymentReceiveAlipay.xml"));

            //###取得XML的節點
            XmlElement eleMerchantID = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantID");
            XmlElement eleMerchantTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantTradeNo");
            XmlElement eleRtnCode = (XmlElement)XML.SelectSingleNode("Root/Data/RtnCode");
            XmlElement eleRtnMsg = (XmlElement)XML.SelectSingleNode("Root/Data/RtnMsg");
            XmlElement eleTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/TradeNo");
            XmlElement eleTradeDate = (XmlElement)XML.SelectSingleNode("Root/Data/TradeDate");
            XmlElement eleTradeAmount = (XmlElement)XML.SelectSingleNode("Root/Data/TradeAmount");
            XmlElement eleAlipayID = (XmlElement)XML.SelectSingleNode("Root/Data/AlipayID");
            XmlElement eleAlipayTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/AlipayTradeNo");
            XmlElement eleTimeStamp = (XmlElement)XML.SelectSingleNode("Root/Data/TimeStamp");

            //### 設定XML內容
            eleMerchantID.InnerText = merchantId;
            eleMerchantTradeNo.InnerText = merchantTradeNo;
            eleRtnCode.InnerText = "1";
            eleRtnMsg.InnerText = "success";
            eleTradeNo.InnerText = tradeNo;
            eleTradeDate.InnerText = "2012/12/12 17:07:18";
            eleTradeAmount.InnerText = tradeAmount;
            eleAlipayID.InnerText = "2088002260834144";
            eleAlipayTradeNo.InnerText = "2012121202863314";

            long epoch = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;
            eleTimeStamp.InnerText = epoch.ToString();

            //### 將XML透過AES加密
            string XMLData = new AllPay.ShareLib.Crypt().AES_EnCrypt(AesHashKey, AesHashIv, XML.OuterXml);

            //先server端回傳
            string serverReponse = new AllPay.ShareLib.Network().FormPost(serverReplyUrl, "XMLData=" + XMLData, "", 0, 65001);

            //再client端回傳
            string response = new AllPay.ShareLib.Network().FormPost(relpyUrl, "XMLData=" + XMLData, "", 0, 65001);
            //DoRequest(relpyUrl, XMLData);

            return null;
        }
Пример #5
0
        //測試回傳給payment WebATM付款成功的動作
        public ActionResult TestWebAtmReturn()
        {

            string merchantId = "999999999";
            string merchantTradeNo = "40964";           //payment的tradeID
            string tradeNo = "20121202033318643476";    //payment center的tradeNo(隨便填,可以不用改)
            string tradeAmount = "1000";
            string AesHashKey = "fugvqTnG3ROx81MO";
            string AesHashIv = "WkSfnqIaHLbUMV5X";



            //string serverRelpyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/srv/webatm/result";
            //string clientReplyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/cnt/webatm/result";
            string serverRelpyUrl = "https://payment.allpay.com.tw/bank/paymentcenter/srv/webatm/result";
            string clientReplyUrl = "https://payment.allpay.com.tw/bank/paymentcenter/cnt/webatm/result";

            //也必需更新payment center的訂單,因為payment會反查
            /*
                update Payment_TradeNo
                set PaymentStatus = '1'
                ,PaymentDate = GETDATE()
                where TradeID = 12153

                update Payment_TradeDetail_WebATM
                set RtnCode = '1'
                ,RtnPaymentDate= GETDATE()
                ,RtnBankCode = '008'
                ,RtnBankAcc = '168371'
                where TradeID = 12153
             * */

            XmlDocument XML = new XmlDocument();
            XML.Load(HttpContext.Server.MapPath("~/App_Data/ReturnMerchantWebATM.xml"));

            //###取得XML的節點
            XmlElement eleMerchantID = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantID");
            XmlElement eleMerchantTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantTradeNo");
            XmlElement eleRtnCode = (XmlElement)XML.SelectSingleNode("Root/Data/RtnCode");
            XmlElement eleRtnMsg = (XmlElement)XML.SelectSingleNode("Root/Data/RtnMsg");
            XmlElement eleTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/TradeNo");
            XmlElement eleTradeDate = (XmlElement)XML.SelectSingleNode("Root/Data/TradeDate");
            XmlElement eleTradeAmount = (XmlElement)XML.SelectSingleNode("Root/Data/TradeAmount");
            XmlElement eleAccBank = (XmlElement)XML.SelectSingleNode("Root/Data/AccBank");
            XmlElement eleAccNo = (XmlElement)XML.SelectSingleNode("Root/Data/AccNo");
            XmlElement eleBankName = (XmlElement)XML.SelectSingleNode("Root/Data/BankName");

            //### 設定XML內容
            eleMerchantID.InnerText = merchantId;
            eleMerchantTradeNo.InnerText = merchantTradeNo;
            eleRtnCode.InnerText = "1";
            eleRtnMsg.InnerText = "success";
            eleTradeNo.InnerText = tradeNo;
            eleTradeDate.InnerText = "2012/12/02 03:33:18"; // DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
            eleTradeAmount.InnerText = tradeAmount;
            eleAccBank.InnerText = "808";
            eleAccNo.InnerText = "17962";
            eleBankName.InnerText = "ESUN";

            //### 將XML透過AES加密
            string XMLData = new AllPay.ShareLib.Crypt().AES_EnCrypt(AesHashKey, AesHashIv, XML.OuterXml);

            string serverResponse = new AllPay.ShareLib.Network().FormPost(serverRelpyUrl, "XMLData=" + XMLData, "", 0, 65001);

            //再client端回傳
            string clientResponse = new AllPay.ShareLib.Network().FormPost(clientReplyUrl, "XMLData=" + XMLData, "", 0, 65001);

            ViewBag.ServerResponse = serverResponse;
            ViewBag.ServerResult = false;

            if (serverResponse.IndexOf("1|OK") > -1)
            {
                ViewBag.Result = true;
            }

            ViewBag.ClientResponse = clientResponse;

            return View();
        }
Пример #6
0
        //測試回傳給payment ATM付款成功的動作
        public ActionResult TestAtmHncbReturn()
        {

            //string merchantId = "999999999";
            //string merchantTradeNo = "100050";           //payment的tradeID
            //string tradeNo = "20121204134122541156";    //payment center的tradeNo
            //string AesHashKey = "fugvqTnG3ROx81MO";
            //string AesHashIv = "WkSfnqIaHLbUMV5X";
            //string serverReplyUrl = "http://devpayment.allpay.com.tw:12005/bank/paymentcenter/srv/atm/result";


            string merchantId = "2000132";
            string merchantTradeNo = "100050";           //payment的tradeID
            string tradeNo = "20121204134122541156";    //payment center的tradeNo
            string AesHashKey = "ejCk326UnaZWKisg";
            string AesHashIv = "q9jcZX8Ib9LM8wYk";
            string serverReplyUrl = "http://linda.sunup.net/test/pay_info.php";
            
            //也必需更新payment center的訂單,因為payment會反查
            /*
                update Payment_TradeNo
                set PaymentStatus = '1'
                ,PaymentDate = GETDATE()
                where TradeID = 12153

                update Payment_TradeDetail_ATM
                set RtnCode = '1'
                ,RtnPaymentDate= GETDATE()
                ,RtnBankCode = '008'
                ,RtnBankAcc = '168371'
                where TradeID = 12153
             * */

            XmlDocument XML = new XmlDocument();
            XML.Load(HttpContext.Server.MapPath("~/App_Data/NoticeMerchantATM.xml"));

            //###取得XML的節點
            XmlElement eleMerchantID = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantID");
            XmlElement eleMerchantTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/MerchantTradeNo");
            XmlElement eleRtnCode = (XmlElement)XML.SelectSingleNode("Root/Data/RtnCode");
            XmlElement eleRtnMsg = (XmlElement)XML.SelectSingleNode("Root/Data/RtnMsg");
            XmlElement eleTradeNo = (XmlElement)XML.SelectSingleNode("Root/Data/TradeNo");
            XmlElement elePayDate = (XmlElement)XML.SelectSingleNode("Root/Data/PayDate");
            XmlElement eleTradeAmount = (XmlElement)XML.SelectSingleNode("Root/Data/TradeAmount");
            XmlElement eleAccBank = (XmlElement)XML.SelectSingleNode("Root/Data/AccBank");
            XmlElement eleAccNo = (XmlElement)XML.SelectSingleNode("Root/Data/AccNo");

            //### 設定XML內容
            eleMerchantID.InnerText = merchantId;
            eleMerchantTradeNo.InnerText = merchantTradeNo;
            eleRtnCode.InnerText = "1";
            eleRtnMsg.InnerText = "success";
            eleTradeNo.InnerText = tradeNo;
            elePayDate.InnerText = "2013/10/18 23:38:18";
            eleTradeAmount.InnerText = "105";
            eleAccBank.InnerText = "812";
            eleAccNo.InnerText = "123123";

            //### 將XML透過AES加密
            string XMLData = new AllPay.ShareLib.Crypt().AES_EnCrypt(AesHashKey, AesHashIv, XML.OuterXml);
            
            //server端回傳
            string serverReponse = new AllPay.ShareLib.Network().FormPost(serverReplyUrl, "XMLData=" + XMLData, "", 0, 65001);

            ViewBag.Response = serverReponse;
            ViewBag.Result = false;

            if (serverReponse.IndexOf("1|OK") > -1)
            {
                ViewBag.Result = true;
            }

            return View();

        }
Пример #7
0
        /// <summary>
        /// 模擬要導到AllPay接收綠界信用卡訂單的
        /// </summary>
        /// <returns></returns>
        public ActionResult CreateCreditCardTradeToCreditAllPay()
        {
            string AuthURL = "https://credit.allpay.com.tw/form_ssl.php";
            string act = "auth";
            string client = "3";
            string card_no = "4311952222222222";
            string CARDM = "12";
            string CARDY = "12";
            string amount = "2"; //交易金額
            string od_sob = "1234567";  //訂單編號
            string cvv2 = "123";    //卡片未三碼
            string roturl = "http://test.allpay.com.tw";

            string PostData = string.Format("act={0}&client={1}&card_no={2}&CARDM={3}&CARDY={4}&amount={5}&od_sob={6}&cvv2={7}&roturl={8}", act, client, card_no, CARDM, CARDY, amount, od_sob, cvv2, roturl);

            //Post至MP反查訂單狀態
            string resultXML = new AllPay.ShareLib.Network().FormPostReferrURL(AuthURL, "", PostData, 950);

            //設定要Post的資料
            Dictionary<string, string> postCollection = new Dictionary<string, string>();
            postCollection.Add("act", act);
            postCollection.Add("client", client);
            postCollection.Add("card_no", card_no);
            postCollection.Add("CARDM", CARDM);
            postCollection.Add("CARDY", CARDY);
            postCollection.Add("amount", amount);
            postCollection.Add("od_sob", od_sob);
            postCollection.Add("cvv2", cvv2);

            postCollection.Add("roturl", roturl);

            TempData["PostCollection"] = postCollection;
            TempData["PostURL"] = AuthURL;

            return RedirectToAction("AutoSubmitForm", "Common");

        }
        /// <summary>
        /// 模擬廠商通知AllPay訂單的退換貨狀態
        /// </summary>
        /// <returns></returns>
        public ActionResult SendOrderChangeNotify()
        {
            string realIP = new AllPay.ShareLib.Network().GetRemoteRealIP();

            long merchantId = 1000070;   //測試機目前給企劃測試的特店id是1000070

            int tradeQuantity = 2;
            string ShippingState = "1";  // 1:退貨通知 / 2:換貨通知 / 3:取消訂單

            Trade trade = new Trade();

            //測試用資料
            //TradeNo
            trade.TradeNo.AllPayTradeNo = "";

            //TradeDetail
            trade.TradeDetail.MerchantID = merchantId;
            trade.TradeDetail.MerchantTradeNo = "";
            trade.TradeDetail.CharSet = "utf-8"; 

            for (int i = 1; i <= tradeQuantity; i++)
            {
                //TradeItemsDetail
                TradeItemsDetail tradeItemsDetailA = new TradeItemsDetail();
                tradeItemsDetailA.ItemNo = "A00" + i;
                tradeItemsDetailA.SubTotalAMT = 5;
                tradeItemsDetailA.ShippingState = ShippingState;
                tradeItemsDetailA.VendorReplyStatus = "1";
                
                trade.TradeItemsDetailList.Add(tradeItemsDetailA);
            }

            return View(trade);

        }
Пример #9
0
        /// <summary>
        /// 綠界信用卡授權
        /// </summary>
        /// <returns></returns>
        public ActionResult TestGreenWorldCreditCardAuth()
        {
            string AuthURL = "https://credit.allpay.com.tw/form_ssl.php";
            string act = "auth";
            string client = "3";
            string card_no = "4311952222222222";
            string CARDM = "12";
            string CARDY = "12";
            string amount = "2"; //交易金額
            string od_sob = "1234567";  //訂單編號
            string cvv2 = "123";    //卡片未三碼
            string roturl = "http://test.allpay.com.tw";

            string PostData = string.Format("act={0}&client={1}&card_no={2}&CARDM={3}&CARDY={4}&amount={5}&od_sob={6}&cvv2={7}&roturl={8}", act, client, card_no, CARDM, CARDY, amount, od_sob, cvv2, roturl);

            //PostData = "act=auth&client=1031032&amount=220&stage=3&od_sob=%u53f0%u7063%u6e90%u5473%u672c%u8216GTS0007805+AAE2EA11DA61E5924B3A0389B83108A0&roturl=http%3a%2f%2fgotwshop.kwdodo.idv.tw%2fAPI%2fordersGetGreenWorldECPay&bk_posturl=http%3a%2f%2fgotwshop.kwdodo.idv.tw%2fAPI%2fordersGetGreenWorldECPayBK";

            //Post至MP反查訂單狀態
            string resultXML = new AllPay.ShareLib.Network().FormPostReferrURL(AuthURL, "", PostData, 950);

            //設定要Post的資料
            Dictionary<string, string> postCollection = new Dictionary<string, string>();
            postCollection.Add("act", act);
            postCollection.Add("client", client);
            postCollection.Add("card_no", card_no);
            postCollection.Add("CARDM", CARDM);
            postCollection.Add("CARDY", CARDY);
            postCollection.Add("amount", amount);
            postCollection.Add("od_sob", od_sob);
            postCollection.Add("cvv2", cvv2);

            postCollection.Add("roturl", roturl);

            TempData["PostCollection"] = postCollection;
            TempData["PostURL"] = AuthURL;

            return RedirectToAction("AutoSubmitForm", "Common");

        }
        //測試回傳給payment center 支付寶付款成功的動作
        public ActionResult TestAlipayReturnToPaymentCenter()
        {

            string mer_id = "4321";
            string payment_type = "alipay";
            string tsr = "123321";
            string od_sob = "12339";      //payment center的tradeID
            string amt = "30";         //付款金額
            string succ = "1";
            string alipay_buyer = "10000223";
            string alipay_no = "20120830111";
            string proc_date = "20121022";
            string proc_time = "162530";
            string mac = "1000070";

            string relpyUrl = "http://devpaymentcenter.allpay.com.tw:12003/bank/gw/srv/alipay/result";

            string getUrl = string.Format("mer_id={0}&payment_type={1}&tsr={2}&od_sob={3}&amt={4}&succ={5}&alipay_buyer={6}&alipay_no={7}&proc_date={8}&proc_time={9}&mac={10}"
                , mer_id, payment_type, tsr, od_sob, amt, succ, alipay_buyer, alipay_no, proc_date, proc_time, mac);

            string response = new AllPay.ShareLib.Network().FormPost(relpyUrl, getUrl, "", 0, 65001);
            //DoRequest(relpyUrl, XMLData);

            return null;
        }
        /// <summary>
        /// 測試第一銀行的訂單反查功能
        /// </summary>
        /// <returns></returns>
        public ActionResult TestFirstBankQueryTrade() { 
        
            FirstWebATMClientReturn FirstWebAtmClientReturnModel = new FirstWebATMClientReturn();

            string MID = "T00535388511";
            string orderCheckURL = "https://eatm.firstbank.com.tw/acq/cardpayinq";

            string toMacString = MID + "10444" ;     //TardeID

            string MAC = GenerateTradeMAC(toMacString);

            XmlDocument XML = new XmlDocument();

            //讀取範本檔
            XML.Load(Server.MapPath("~/App_Data/SendFirstWebATMOrderCheck.xml"));

            //取得XML的節點
            XmlElement eleSendSeqNo = (XmlElement)XML.SelectSingleNode("CardPayInqRq/SendSeqNo");
            XmlElement eleMID = (XmlElement)XML.SelectSingleNode("CardPayInqRq/MID");
            XmlElement eleMAC = (XmlElement)XML.SelectSingleNode("CardPayInqRq/MAC");

            eleSendSeqNo.InnerText = FirstWebAtmClientReturnModel.SendSeqNo;        //原傳送序號
            eleMID.InnerText = MID;                                                 //繳費單位代碼(台銀給定)
            eleMAC.InnerText = toMacString;                                                 //押碼

            string cardBillInqRq = Convert.ToBase64String(Encoding.Default.GetBytes(XML.OuterXml));

            string PostData = string.Format("CardPayInqRq={0}", cardBillInqRq);

            //Post至MP反查訂單狀態
            string resultXML = new AllPay.ShareLib.Network().FormPostReferrURL(orderCheckURL, "", PostData, 950);

            //Hashtable hashtable = new Hashtable();

            //hashtable.Add("CardPayInqRq", cardBillInqRq);

            //string resultXML = DoRequest(orderCheckURL, hashtable);

            return null;
        }