Beispiel #1
0
        /// <summary>
        /// Saves the card holder payment status.
        /// </summary>
        /// <param name="chpsdto">The chpsdto.</param>
        /// <param name="transactionNumber">The transaction number.</param>
        /// <param name="accountNumber">The account number.</param>
        /// <param name="transactionAmount">The transaction amount.</param>
        /// <param name="TxnRefrenceNo">The TXN refrence no.</param>
        /// <param name="operation">The operation.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        private string SaveCardHolderPaymentStatus(CH_Payment_Status_DtlDTO chpsdto, string transactionNumber, string BillDeskOnlineID,
                                                   double transactionAmount, string TxnRefrenceNo, int operation, string paymentStatus,
                                                   string BankRefNo, string BankId, string AuthStatus) // Add BillDeskOnlineID instead of Accnumber parameter on 20-01-2015 as per client req.
        {
            string TransactionNumber = "";

            try
            {
                CardHolderPaymentManager chps = new CardHolderPaymentManager();
                if (operation == 1)
                {
                    if (chpsdto != null)
                    {
                        TransactionNumber = chps.SaveCardHolderPaymentStatus(chpsdto);
                    }
                }
                else if (operation == 2)
                {
                    TransactionNumber = chps.UpdateCardHolderPaymentStatus(transactionNumber, BillDeskOnlineID, transactionAmount,
                                                                           TxnRefrenceNo, paymentStatus, BankRefNo, BankId, AuthStatus);
                }
                else
                {
                    TransactionNumber = "";
                }
            }
            catch
            {
                DisplayMessage(Constants.PaymentError, true);
            }
            return(TransactionNumber);
        }
Beispiel #2
0
        /// <summary>
        /// Saves the card holder payment status.
        /// </summary>
        /// <param name="objCardHolderPaymentStatus">The obj card holder payment status.</param>
        /// <returns></returns>
        /// <remarks></remarks>
        public string SaveCardHolderPaymentStatus(CH_Payment_Status_DtlDTO objCardHolderPaymentStatus)
        {
            if (objCardHolderPaymentStatus.PaymentStatus_Id == 0)
            {
                CH_PaymentStatus_Dtl obj = new CH_PaymentStatus_Dtl();
                if (objCardHolderPaymentStatus.Creditcard_acc_number != null)
                {
                    obj.Creditcard_acc_number = objCardHolderPaymentStatus.Creditcard_acc_number;
                }
                if (objCardHolderPaymentStatus.Credit_card_number != null)
                {
                    obj.Credit_card_number = objCardHolderPaymentStatus.Credit_card_number;
                }
                if (objCardHolderPaymentStatus.Transaction_number != null)
                {
                    obj.Transaction_number = objCardHolderPaymentStatus.Transaction_number;
                }
                if (objCardHolderPaymentStatus.TxnReferenceNo != null)
                {
                    obj.TxnReferenceNo = objCardHolderPaymentStatus.TxnReferenceNo;
                }
                else
                {
                    obj.TxnReferenceNo = null;
                }
                obj.BillDeskOnlineID = objCardHolderPaymentStatus.BillDeskOnlineID;
                obj.AmountDue        = objCardHolderPaymentStatus.AmountDue;
                obj.PaymentStatus    = objCardHolderPaymentStatus.PaymentStatus;

                obj.BankRefNo  = objCardHolderPaymentStatus.BankRefNo;
                obj.BankId     = objCardHolderPaymentStatus.BankId;
                obj.AuthStatus = objCardHolderPaymentStatus.AuthStatus;

                obj.IP_Address = objCardHolderPaymentStatus.IP_Address;
                obj.Created_by = objCardHolderPaymentStatus.Created_by;
                obj.Created_dt = objCardHolderPaymentStatus.Created_dt;
                repCardHolderPaymentStatus.Add(obj);
                GeneralManager.Commit();
                return(obj.Transaction_number);
            }
            return("");
        }
Beispiel #3
0
        /// <summary>
        /// Sends the request to bill desk.
        /// </summary>
        /// <remarks></remarks>
        private void SendRequestToBillDesk()
        {
            try
            {
                string AdditionalInfocrnum = CardHolderManager.GetLoggedInUser().creditcard_acc_number;
                string AdditionalInfo1     = CardHolderManager.GetLoggedInUser().CH_Card.BILLDESK_ONLINE_ID; //As per client saying, We add this info instead of Acc_num (27-Jan-2014)
                string AdditionalInfo2     = CardHolderName;

                DisplayMessage("", false);
                if (Convert.ToDouble(txtEnterAmount.Text.Trim()) == 0)
                {
                    DisplayMessage(Constants.Error1, true);
                    return;
                }
                //double amountDue = Convert.ToInt64(Session[sessionAmountDue]);
                double amountDue = Convert.ToDouble(Session[sessionAmountDue]);
                //double TotalUnbilledAmount = Convert.ToInt64(Session[totalUnbilledAmount]);
                double TotalUnbilledAmount = Convert.ToDouble(Session[totalUnbilledAmount]);
                //------------------------------REfer Email RE: Issues / Bugs Identified 03/20/2015 12:13 PM------------------------------//
                //if (amountDue > 0)
                //{
                //    if (Convert.ToDouble(txtEnterAmount.Text.Trim()) > amountDue)
                //    {
                //        DisplayMessage(Constants.Error3, true);
                //        return;
                //    }
                //}
                //else if (TotalUnbilledAmount > 0)
                //{
                //    if (Convert.ToDouble(txtEnterAmount.Text.Trim()) > TotalUnbilledAmount)
                //    {
                //        DisplayMessage(Constants.Error3, true);
                //        return;
                //    }
                //}
                //------------------------------REfer Email RE: Issues / Bugs Identified 03/20/2015 12:13 PM------------------------------//

                CH_Payment_Status_DtlDTO chpsdto = new CH_Payment_Status_DtlDTO();
                chpsdto.PaymentStatus_Id      = 0;
                chpsdto.BillDeskOnlineID      = AdditionalInfo1;
                chpsdto.Creditcard_acc_number = AdditionalInfocrnum;
                chpsdto.Credit_card_number    = CreditCardNumber;
                chpsdto.Transaction_number    = CustomerID.Value;
                chpsdto.AmountDue             = Convert.ToDouble(txtEnterAmount.Text.Trim());
                chpsdto.PaymentStatus         = unsuccessful;
                chpsdto.Created_dt            = DateTime.Now;
                chpsdto.Created_by            = CardHolderManager.GetLoggedInUser().CardHolder_Id;
                chpsdto.IP_Address            = Request.UserHostAddress;
                string transactionNumber = SaveCardHolderPaymentStatus(chpsdto, "", "", 0, "", 1, "", "", "", "");
                if (transactionNumber != "")
                {
                    //if (Convert.ToInt32(txtEnterAmount.Text.Trim()) > 0 && rblPaymentOptions.SelectedValue == "2")
                    if (Convert.ToDouble(txtEnterAmount.Text.Trim()) > 0 && rblPaymentOptions.SelectedValue == "2")
                    {
                        Response.Redirect("~/payment_process.aspx?TxnAmount=" + txtEnterAmount.Text.Trim().Encrypt() + "&CustomerID=" + CustomerID.Value.Encrypt() + "&AdditionalInfo1=" + AdditionalInfo1.Encrypt() + "&AdditionalInfo2=" + AdditionalInfo2.Encrypt());
                    }
                }
                else
                {
                    DisplayMessage(Constants.PaymentError, true);
                    lkbRedirectToCardStatement.Visible = false;
                    divDisplayAll.Visible = true;
                }
            }
            catch
            {
                DisplayMessage(Constants.GeneralErrorMessage, true);
                divDisplayAll.Visible = true;
                lkbRedirectToCardStatement.Visible = false;
                return;
            }
        }