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());
        }
Ejemplo n.º 2
0
 // Added this function to return the  response from the last processed message
 // using this for testing
 public string GetRawResponse()
 {
     return(bluePayPost.GetRawResponse());
 }