コード例 #1
0
        protected void btnCard_Click(object sender, EventArgs e)
        {
            try
            {
                BusLogic objBus = new BusLogic();
                Payment objPayment = new Payment();
                objPayment.Accountid = txtaccountno.Text.Trim();
                objPayment.PaymentAmount = txtPaymentAmountCard.Text.Trim();
                objPayment.CreditCard = txtcardnbr.Text.Trim();
                String strRetun = objBus.MakePayment(objPayment);
                if (strRetun.ToUpper() == "OK")
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:javascript:alert('Payment Processed Successfully ' );", true);
                    PaymentHistory();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:javascript:alert('Payment Failed, Plesae try after sometime! ' );", true);
                }

            }
            catch (Exception)
            {

                throw;
            }
        }
コード例 #2
0
ファイル: BusLogic.cs プロジェクト: mohdmuyeen/PCIPay
        public string MakeWalletPayment(Payment objPayment)
        {
            string ReturnValue = string.Empty;
            try
            {
                PCITokenDataModel context = new PCITokenDataModel();
                int val = context.walletPayment(objPayment.Accountid, Convert.ToDecimal(objPayment.PaymentAmount), objPayment.TokenID);
                if (val > 0)
                    ReturnValue = "OK";
                else
                    ReturnValue = "Error";

            }
            catch (Exception)
            {
                ReturnValue = "Error";
            }
            return ReturnValue;
        }
コード例 #3
0
ファイル: BusLogic.cs プロジェクト: mohdmuyeen/PCIPay
        public string MakePayment(Payment objPayment)
        {
            string ReturnValue = string.Empty;
            try
            {
                PCITokenDataModel context = new PCITokenDataModel();
                int val = context.insertpayment(objPayment.Accountid, Convert.ToDecimal(objPayment.PaymentAmount), objPayment.BankAccountNumber, objPayment.RoutingNumber, objPayment.CreditCard);
                if (val > 0)
                    ReturnValue = "OK";
                else
                    ReturnValue = "Error";

            }
            catch (Exception)
            {
                ReturnValue = "Error";
            }
            return ReturnValue;
        }
コード例 #4
0
 protected void btnwallet_Click(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i < gvWallet.Rows.Count; i++)
         {
             RadioButton rbWallet = (RadioButton)gvWallet.Rows[i].FindControl("rbAccountInfo");
             if (rbWallet.Checked)
             {
                 Label lblTokenID = (Label)gvWallet.Rows[i].FindControl("lblwalletTokenid");
                 String TokenID = lblTokenID.Text;
                 BusLogic objBus = new BusLogic();
                 Payment objPayment = new Payment();
                 objPayment.Accountid = txtaccountno.Text.Trim();
                 objPayment.PaymentAmount = txtPaymentAmountWallet.Text.Trim();
                 objPayment.TokenID = TokenID;
                 String strRetun = objBus.MakeWalletPayment(objPayment);
                 if (strRetun.ToUpper() == "OK")
                 {
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:alert('Payment Processed Successfully ' );", true);
                     PaymentHistory();
                 }
                 else {
                     ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "javascript:alert('Payment Failed, Plesae try after sometime! ' );", true);
                 }
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }