コード例 #1
0
        public string Process()
        {
            string postData = "";

            CalcReportTPS();
            postData += "ACCOUNT_ID=" + HttpUtility.UrlEncode(this.accountID) + "&MODE=" + HttpUtility.UrlEncode(this.mode) + "&TAMPER_PROOF_SEAL="
                        + HttpUtility.UrlEncode(this.TPS) + "&REPORT_START_DATE=" + HttpUtility.UrlEncode(this.reportStartDate) + "&REPORT_END_DATE="
                        + HttpUtility.UrlEncode(this.reportEndDate) + "&EXCLUDE_ERRORS=" + HttpUtility.UrlEncode(this.excludeErrors);
            postData += (this.masterID != "") ? "&id=" + HttpUtility.UrlEncode(this.masterID) : "";
            postData += (this.paymentType != "") ? "&payment_type=" + HttpUtility.UrlEncode(this.paymentType) : "";
            postData += (this.transType != "") ? "&trans_type=" + HttpUtility.UrlEncode(this.transType) : "";
            postData += (amountText != "") ? "&amount=" + HttpUtility.UrlEncode(amountText) : "";
            postData += (this.name1 != "") ? "&name1=" + HttpUtility.UrlEncode(this.name1) : "";
            postData += (this.name2 != "") ? "&name2=" + HttpUtility.UrlEncode(this.name2) : "";

            bluePayPost.PerformPost(postData);

            return(bluePayPost.GetStatus());
        }
コード例 #2
0
        private string ProcessPayment(string paymentData, string transType, decimal?amount, string masterId)
        {
            var amountText = amount == null ? "" : amount.ToString();
            var tps        = CalcTps(_secretKey, _accountId, transType, amountText, masterId, _mode);

            string postData =
                String.Format("MERCHANT={0}&MODE={1}&TRANSACTION_TYPE={2}&AMOUNT={3}&TAMPER_PROOF_SEAL={4}&REMOTE_IP={5}&RESPONSEVERSION={6}",
                              HttpUtility.UrlEncode(_accountId), HttpUtility.UrlEncode(_mode),
                              HttpUtility.UrlEncode(transType), HttpUtility.UrlEncode(amountText), HttpUtility.UrlEncode(tps),
                              Dns.GetHostEntry("").AddressList[0], _responseVersion);


            // concatenate the general information (postData) with the specific payment information (paymentData)
            postData = String.Format("{0}{1}", postData, paymentData);

            //await BluePayPostAsync.PerformAsyncPost(postData, transactionURL);
            _bluePayPost.PerformPost(postData);

            BluePayResponse = new Response(_bluePayPost.GetRawResponse());

            return(_bluePayPost.GetStatus());
        }
コード例 #3
0
        public string Process()
        {
            string postData = "";

            queryBySettlement = "0";
            queryByHierarchy  = "0";
            excludeErrors     = "1";
            doNotEscape       = "0";


            CalcReportTPS();
            postData += "ACCOUNT_ID=" + HttpUtility.UrlEncode(this.accountID) + "&MODE=" + HttpUtility.UrlEncode(this.mode) + "&TAMPER_PROOF_SEAL="
                        + HttpUtility.UrlEncode(this.TPS) + "&REPORT_START_DATE=" + HttpUtility.UrlEncode(this.reportStartDate) + "&REPORT_END_DATE="
                        + HttpUtility.UrlEncode(this.reportEndDate) + "&DO_NOT_ESCAPE=" + HttpUtility.UrlEncode(this.doNotEscape)
                        + "&QUERY_BY_SETTLEMENT=" + HttpUtility.UrlEncode(this.queryBySettlement) + "&QUERY_BY_HIERARCHY="
                        + HttpUtility.UrlEncode(this.queryByHierarchy) + "&EXCLUDE_ERRORS=" + HttpUtility.UrlEncode(this.excludeErrors)
                        + "&RESPONSE_VERSION=" + HttpUtility.UrlEncode(this.responseVersion);

            bluePayCommunication.PerformPost(postData);

            return(bluePayCommunication.GetStatus());
        }