public string cardApply_ViaPayeer(int intUserID, double dblAmt, double dblTotalAmt, int intTaskId) { string URL = ""; string strdt = csWallet.getAusCurDateTimeString(); string acc_email, sci_name, currency, order_id, sign, password; acc_email = ConfigurationManager.AppSettings["AdvcashEmail"]; sci_name = ConfigurationManager.AppSettings["AdvcashShopName"]; password = ConfigurationManager.AppSettings["AdvcashPassword"]; currency = "USD"; order_id = csComm.GenrateRandomNumberString(); string[] arHash = { acc_email, sci_name, dblTotalAmt.ToString(), currency, password, order_id }; string implodestr = String.Join(":", arHash); sign = sha256_hash(implodestr); URL = "https://wallet.advcash.com/sci/?ac_account_email=" + acc_email + "&ac_sci_name=" + sci_name + "&ac_amount=" + dblTotalAmt + "&ac_currency=" + currency + "&ac_order_id=" + order_id + "&ac_sign=" + sign + ""; WebRequest request = null; request = WebRequest.Create(URL); WebResponse resp = request.GetResponse(); StreamReader reader = new StreamReader(resp.GetResponseStream()); string responseString = reader.ReadToEnd(); string[] strDateSplit = responseString.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries); reader.Close(); resp.Close(); HttpContext.Current.Session["AdvcashID"] = order_id; string strdesc = "Payment for Apply Card"; string strquery = "INSERT INTO mlm_advcash_payment(userid,amt,total_amt,created_on,order_id, description,taskid) VALUES(" + intUserID + "," + dblAmt + "," + dblTotalAmt + ",'" + strdt + "','" + order_id + "','" + strdesc + "',2)"; objOdbc.executeNonQuery(strquery); return(URL); }
public string InvestViaPerfectMoney(int intUserID, string PerfectMoneyPayeerID, string strAmt, int intEpinTypeID, int intEpinCount, double dblEpinPrice, double dblTotPrice) { ArrayList arrResult = new ArrayList(); clsWallet csWallet = new clsWallet(); string strResult = ""; string PerfectMoneyAc, PerfectMoneyPwd, ReciverPayeerID, strPayId; byte b = 0; string strdt = csWallet.getAusCurDateTimeString(); int strPayin; Dictionary <string, string> d = new Dictionary <string, string>(); PerfectMoneyAc = "9573063"; // ConfigurationManager.AppSettings["PMLoginID"]; PerfectMoneyPwd = "35T5RE49bzVcPqoThyzkNWMZD"; // ConfigurationManager.AppSettings["PMPassPhrase"]; ReciverPayeerID = "U14156621"; // ConfigurationManager.AppSettings["PMPayee"]; strPayin = 1; strPayId = csComm.GenrateRandomNumberString(); d = obj.Transfer(PerfectMoneyAc, PerfectMoneyPwd, PerfectMoneyPayeerID, ReciverPayeerID, Convert.ToDouble(strAmt), Convert.ToInt32(strPayin), Convert.ToInt32(strPayId)); foreach (var item in d) { if (item.Key == "ERROR") { strResult = item.Value; objOdbc.executeNonQuery("insert into mlm_perfectmoney_payment(userid,message,status) values('" + intUserID + "','" + strResult + "',2)"); // CommonMessages.ShowAlertMessage(item.Value); // strResult = "Payment Fail!"; } else { arrResult.Add(item.Value); b = 1; } } if (b == 1) { string strPayeeAccName = arrResult[0].ToString(); string strPayeeAccount = arrResult[1].ToString(); string strPayerAccount = arrResult[2].ToString(); string strAmount = arrResult[3].ToString(); string strPaymentBatchNo = arrResult[4].ToString(); string strPaymentId = arrResult[5].ToString(); try { objOdbc.executeNonQuery("INSERT INTO mlm_perfectmoney_payment(userid,amt,pf_payee_acct_name,pf_payer_acct,pf_payee_acct,pf_amt,pf_batch_no,pf_payment_id,status,created_on, epin_type_id, epin_cost, epin_count, total_cost) VALUES(" + intUserID + "," + strAmount + ",'" + strPayeeAccName + "','" + strPayerAccount + "','" + strPayeeAccount + "'," + strAmount + ",'" + strPaymentBatchNo + "','" + strPaymentId + "', 1,'" + strdt + "', " + intEpinTypeID + ", " + dblEpinPrice + "," + intEpinCount + ", " + dblTotPrice + " )"); objOdbc.executeNonQuery("call purchase_epinBYPaymentgateway(" + intUserID + "," + intEpinTypeID + ", " + intEpinCount + ", 2, 2 , " + dblEpinPrice + " )"); strResult = "A-Code Purchased Successfully !"; } catch (Exception ex) { } } return(strResult); }