Пример #1
0
 public string CreditRequestOnlineInsert(PaytmGateway payment)
 {
     return(objTransacAPI.CreditRequestOnlineInsert(payment));
 }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TransactionManager objTransacManager = new TransactionManager();

            try
            {
                lbl_MID          = Request.Form["MID"];
                lbl_TXNID        = Request.Form["TXNID"];
                lbl_ORDERID      = Request.Form["ORDERID"];
                lbl_BANKTXNID    = Request.Form["BANKTXNID"];
                lbl_TXNAMOUNT    = Request.Form["TXNAMOUNT"];
                lbl_CURRENCY     = Request.Form["CURRENCY"];
                lbl_STATUS       = Request.Form["STATUS"];
                lbl_RESPCODE     = Request.Form["RESPCODE"];
                lbl_RESPMSG      = Request.Form["RESPMSG"];
                lbl_TXNDATE      = Request.Form["TXNDATE"];
                lbl_GATEWAYNAME  = Request.Form["GATEWAYNAME"];
                lbl_BANKNAME     = Request.Form["BANKNAME"];
                lbl_PAYMENTMODE  = Request.Form["PAYMENTMODE"];
                lbl_CHECKSUMHASH = Request.Form["CHECKSUMHASH"];
                lbl_EMAIL        = Request.Form["EMAIL"];
                lbl_MOBILE_NO    = Request.Form["MOBILE_NO"];
                lbl_CUST_ID      = Request.Form["CUST_ID"];
                List <KeyValuePair <string, string> > postparamslist = new List <KeyValuePair <string, string> >();
                for (int i = 0; i < Request.Form.Keys.Count; i++)
                {
                    KeyValuePair <string, string> postparam = new KeyValuePair <string, string>(Request.Form.Keys[i],
                                                                                                Request.Form[i]);
                    postparamslist.Add(postparam);
                }

                foreach (KeyValuePair <string, string> param in postparamslist)
                {
                    if (param.Key == "ORDERID")
                    {
                        resmerchantrefno = param.Value != null ? param.Value : "";
                    }
                    responseparm += (param.Key + ":" + param.Value + "|");
                }
                //LogResponse(resmerchantrefno, responseparm);
                //LogResponse("SUCCESS-0", responseparm);
                if (lbl_STATUS == "TXN_SUCCESS")
                {
                    ////var objmem = new MemberServiceClient();
                    ////var objsc = new ShoppingServiceClient();
                    //LogResponse("SUCCESS-1", responseparm);
                    if (IsValidChecksum())
                    {
                        // LogResponse("SUCCESS-2", responseparm);
                        ////var objutil = new UtilitiesClient();
                        List <TblPaymentGetWayRequest> tblPayment = new List <TblPaymentGetWayRequest>();
                        PaytmGateway payment = new PaytmGateway();
                        payment.ORDER_ID      = lbl_ORDERID;
                        payment.PaymentStatus = lbl_PAYMENTMODE;
                        payment.BillStatus    = lbl_PAYMENTMODE;
                        payment.TxnId         = lbl_BANKTXNID;
                        tblPayment            = objTransacManager.GetCreditRequest(lbl_ORDERID);
                        payment.regid         = tblPayment[0].IdNo;
                        payment.amount        = lbl_TXNAMOUNT;
                        if (tblPayment[0].ORDER_ID != "")
                        {
                            string resp = string.Empty;
                            resp = objTransacManager.CreditRequestOnlineInsert(payment);
                            if (resp == "OK")
                            {
                                lblerrormsg.Text = "Payment is successfuly done ! your transaction id is " + lbl_BANKTXNID + " click <a href = http://franchise.sarsobiz.net/Report/WalletReport>here</a>" + " to check your wallet balance.";
                            }
                            else
                            {
                                lblerrormsg.Text = "some error occored please contact to administrator.";
                            }
                        }
                        else
                        {
                        }
                    }
                    else
                    {
                        lblerrormsg.Text = "some error occored please contact to administrator.";
                    }
                }
                else
                {
                    lblerrormsg.Text = "some error occored please contact to administrator.";
                }
            }
            //}
            //}
            catch (Exception ex)
            {
                // LogResponse("SUCCESS-10-ERROR", "");
                //LogResponse(!string.IsNullOrEmpty(resmerchantrefno) ? resmerchantrefno : "Order ID getting empty",ex.Message);
            }
        }