Exemplo n.º 1
0
        private static void RetrieveCreditCardOutstandingTransactions(string creditCardNo, CreditCardOutstandingTransaction transaction)
        {
            try
            {
                Params param = new Params()
                {
                    Parameter = new Dictionary <string, string>()
                };
                param.RequestTransType = "GetUnsettleCreditCardTransactionByCardNo";
                param.Parameter.Add("cardNo", creditCardNo);
                param.WSDL = "CCInquiryUnsettleTransaction";
                ESBData data = EAI.RetrieveESBData(param);

                if (data.Result.Count > 1)
                {
                    data.Result.RemoveAt(0); // Remove the first record as it contains the keys "cardNo" and "appCode"
                    foreach (StringDictionary entry in data.Result)
                    {
                        transaction.Transactions.Add(new CreditCardTransaction()
                        {
                            CreditCardNo    = creditCardNo,
                            EffectiveDate   = Formatter.ParseExact(entry[OutstandingCreditCardTransactionResultKeyName.EffectiveDate], "JY"),
                            Description     = entry[OutstandingCreditCardTransactionResultKeyName.Description],
                            TransactionType = entry[OutstandingCreditCardTransactionResultKeyName.TransactionType],
                            Source          = entry[OutstandingCreditCardTransactionResultKeyName.Source].PadLeft(6, '0'),
                            Days            = Formatter.GetParsedNumeric(entry[OutstandingCreditCardTransactionResultKeyName.Days], false),
                            Nominal         = Formatter.GetParsedDouble(entry[OutstandingCreditCardTransactionResultKeyName.Nominal], false)
                        });
                    }
                }
            }
            catch (Exception e)
            {
            }
        }
Exemplo n.º 2
0
        private void GetSegmentation(string cisno)
        {
            Params param = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            param.RequestTransType = "SearchCustInfoByCIS";
            param.WSDL             = "CustomerInformationInquiry";
            param.Parameter.Add("cisNo", cisno);
            ESBData data = EAI.RetrieveESBData(param);

            string customersegmentation = string.Empty;

            if (data.Result != null)
            {
                foreach (StringDictionary entry in data.Result)
                {
                    customersegmentation = string.IsNullOrEmpty(entry["customersegmentation"]) ? customersegmentation : entry["customersegmentation"];
                }
            }

            if (!string.IsNullOrEmpty(customersegmentation))
            {
                this.Membership   = Utility.GetCustomerSegmentation(customersegmentation, "Membership");
                this.Segmentation = Utility.GetCustomerSegmentation(customersegmentation, "Segmentation");
            }
        }
Exemplo n.º 3
0
        public JsonResult GetAllCreditCardStatus(string _strCreditCards = null)
        {
            List <CreditCard> _creditCards = string.IsNullOrEmpty(_strCreditCards) ? new List <CreditCard>() : new JavaScriptSerializer().Deserialize <List <CreditCard> >(_strCreditCards);

            Params paramListCCbyCardNoCardType = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            paramListCCbyCardNoCardType.WSDL             = "CCInformationDetail";
            paramListCCbyCardNoCardType.RequestTransType = "GetCreditCardDetailByCardNoAndCardType";

            List <CreditCard> modelCreditCard = new List <CreditCard>();

            foreach (var record in _creditCards)
            {
                paramListCCbyCardNoCardType.Parameter.Remove("cardNo");
                paramListCCbyCardNoCardType.Parameter.Remove("cardType");
                paramListCCbyCardNoCardType.Parameter.Add("cardNo", record.CreditCardNumber);
                paramListCCbyCardNoCardType.Parameter.Add("cardType", record.CCType);
                ESBData searchResultCCbyCardNoCardType = EAI.RetrieveESBData(paramListCCbyCardNoCardType);

                if (searchResultCCbyCardNoCardType.Result != null && searchResultCCbyCardNoCardType.Result.Count != 0)
                {
                    record.Status = Utility.GetStringMap(13, 1, searchResultCCbyCardNoCardType.Result[0][CreditCardInquiryStatusResultKeyName.BlockCode]);
                }
                else
                {
                    record.Status = "";
                }
                modelCreditCard.Add(record);
            }
            return(Json(modelCreditCard, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        public ActionResult EmailDelete()
        {
            string getType        = Request["_type"];
            string getNoReferensi = Request["_noReferensi"];

            ViewBag.Type = "deleteEmail";
            Params paramList = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };
            ESBData esbData = new ESBData()
            {
                Result = new List <StringDictionary>()
            };

            Object[]     data         = new Object[1];
            JSONResponse jsonResponse = new JSONResponse();

            bool checkSpv = false;

            switch (getType)
            {
            case "inbox":
                checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailInbox", "Delete");
                break;

            case "kirimEmail":
                checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailSend", "Delete");
                break;
            }

            switch (checkSpv)
            {
            case true:
                paramList.RequestTransType = "DeleteEmailByRefNo";
                paramList.Parameter.Add("PK_ID", getNoReferensi);

                paramList.WSDL = "ESBDBDelimiter";

                esbData = EAI.RetrieveESBData(paramList);

                if (esbData != null && esbData.Result.Count != 0)
                {
                    foreach (StringDictionary kvp in esbData.Result)
                    {
                        if (kvp.ContainsKey("result"))
                        {
                            jsonResponse.Value = new
                            {
                                Message = Resources.Email.EmailDeleteSuccess
                            };
                            jsonResponse.Response = kvp["result"];
                        }
                    }
                }
                break;
            }

            return(Json(jsonResponse));
        }
Exemplo n.º 5
0
        public static BCAByPhoneTransaction BBP(Params request)
        {
            BCAByPhoneTransaction transaction = new BCAByPhoneTransaction();
            ESBData data = EAI.RetrieveESBData(request);

            if (data.Result != null && data.Result.Count() > 0)
            {
                int idx = 0;
                foreach (StringDictionary entry in data.Result)
                {
                    if (idx == 0)
                    {
                        transaction.NextPos = entry["nextPos"];
                        transaction.PrevPos = entry["prevPos"];
                        transaction.CurrPos = entry["currPos"];
                    }
                    else
                    {
                        BBPTRX trx = new BBPTRX();
                        trx.CustomerID      = entry["custidoraccnum"];
                        trx.TransactionDate = entry["localdate"];
                        trx.TransactionTime = entry["localtime"];
                        trx.TransactionDesc = entry["txndesc"];
                        trx.ResponseCode    = entry["respcde"];
                        transaction.Transactions.Add(trx);
                    }
                    idx++;
                }
            }
            else
            {
                transaction.Msg = data.Message;
            }
            return(transaction);
        }
Exemplo n.º 6
0
        public static CreditCardCurrentTransaction CurrentTransactions(Params request)
        {
            CreditCardCurrentTransaction transaction = new CreditCardCurrentTransaction();

            try
            {
                if (request != null)
                {
                    if (request.Parameter.ContainsKey("cardNo"))
                    {
                        string cardNo = request.Parameter["cardNo"];
                        CreditCardInformation information = CreditCardService.RetrieveCreditCardDetail(cardNo, CreditCardService.RetrieveCreditCardType(cardNo));
                        transaction.CustomerNo = information.CustomerNo;
                        transaction.CreditCards.Add(information);
                        CreditCardCurrentTransaction currentTrx = RetrieveCreditCardCurrentTransactions(cardNo);
                        foreach (CreditCardTransaction trx in currentTrx.Transactions)
                        {
                            transaction.Transactions.Add(trx);
                        }
                    }
                    else if (request.Parameter.ContainsKey("custNo"))
                    {
                        // If a customer has multiple Credit Cards, the "Credit Card Customer No" is still the same for all the credit cards.
                        Params param = new Params()
                        {
                            Parameter = new Dictionary <string, string>()
                        };
                        param.RequestTransType = "GetAllRelatedCreditCardInOneCustNo";
                        param.Parameter.Add("custNo", request.Parameter["custNo"]);
                        param.WSDL = "AllRelatedDetail";
                        ESBData data = EAI.RetrieveESBData(param);
                        transaction.CustomerNo = request.Parameter["custNo"];

                        if (data.Result != null && data.Result.Count != 0)
                        {
                            // All related credit cards (from the service 'GetAllRelatedCreditCardInOneCustNo') are returned as a set of "cardType", "cardNo", "creditLinePerCard"
                            foreach (StringDictionary entry in data.Result)
                            {
                                CreditCardInformation information = CreditCardService.RetrieveCreditCardDetail(entry["cardNo"], entry["cardType"]);
                                transaction.CreditCards.Add(information);
                                CreditCardCurrentTransaction currentTrx = RetrieveCreditCardCurrentTransactions(entry["cardNo"]);
                                foreach (CreditCardTransaction trx in currentTrx.Transactions)
                                {
                                    transaction.Transactions.Add(trx);
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
            }

            return(transaction);
        }
Exemplo n.º 7
0
        private static CreditCardHistoricalTransaction RetrieveCreditCardHistoricalTransactions(string creditCardNo, string statementDate)
        {
            CreditCardHistoricalTransaction transaction = new CreditCardHistoricalTransaction();

            try
            {
                Params param = new Params()
                {
                    Parameter = new Dictionary <string, string>()
                };
                param.RequestTransType = "GetHistoryCreditCardTransactionOnStateDate";
                param.Parameter.Add("cardNo", creditCardNo);
                param.Parameter.Add("stateDate", statementDate);
                param.WSDL = "CCBillingStatementByStatementDate";
                ESBData data = EAI.RetrieveESBData(param);

                if (data.Result.Count > 1)
                {
                    int counter = 0;
                    if (data.Result.Count > 0)
                    {
                        // The first record contains the keys "nbrDetail","length","appCode","card"
                        int.TryParse(data.Result[0]["nbrDetail"], out counter);
                    }

                    for (int i = 1; i <= counter; i++)
                    {
                        StringDictionary eachTransaction = data.Result[i];

                        //if ("INTEREST".Equals(eachTransaction["desc"]) && Formatter.GetParsedDouble(eachTransaction["amount"], false) == 0.00)
                        //    continue;

                        transaction.Transactions.Add(new CreditCardTransaction()
                        {
                            CreditCardNo    = creditCardNo,
                            TransactionDate = Formatter.ParseExact(eachTransaction["postDate"], "JY"),
                            Description     = eachTransaction["desc"],
                            TransactionCode = eachTransaction["txnCode"],
                            ReferenceNumber = string.IsNullOrEmpty(eachTransaction["refNmbr"]) ? string.Empty : eachTransaction["refNmbr"].PadLeft(11, '0'),
                            Amount          = Formatter.GetParsedDouble(eachTransaction["amount"], false),
                            PreviousBalance = Formatter.GetParsedDouble(eachTransaction["prevBal"], false),
                        });
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 8
0
        public static SMSTopUpTransaction SMSTopUp(Params request)
        {
            SMSTopUpTransaction transaction = new SMSTopUpTransaction();
            Params param = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            try
            {
                param.RequestTransType = "GetTopUpTransactionByMobileNo";
                param.Parameter.Add("FK_CustID", request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);
                param.Parameter.Add("StartDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["startDate"]), "MM/dd/yyyy"));
                param.Parameter.Add("EndDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["endDate"]).AddDays(1), "MM/dd/yyyy"));
                param.WSDL = "ESBDBDelimiter";
                ESBData data = EAI.RetrieveESBData(param);

                if (data.Result != null && data.Result.Count > 0)
                {
                    foreach (StringDictionary entry in data.Result)
                    {
                        SMSTopUpTRX trx             = new SMSTopUpTRX();
                        DateTime?   TransactionDate = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                        trx.TransactionDate     = TransactionDate;
                        trx.RequestId           = entry["billerid"];
                        trx.AtmCardNumber       = entry["cardnumber"];
                        trx.AccountNumber       = entry["acctidfrom"];
                        trx.ValueOfTransactions = Formatter.GetParsedNumeric(entry["amt"], false);
                        trx.ResponseCode        = Utility.GetDisplayText("TransactionAttributeMapping", "SMS Top Up", "Response Code", entry["srvrstatuscode"]);
                        transaction.Transactions.Add(trx);
                    }

                    param.Parameter        = new Dictionary <string, string>();
                    param.RequestTransType = "GetTopUpInfoByMobileNo";
                    param.Parameter.Add("CustId", request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);
                    param.WSDL = "ESBDBDelimiter";
                    ESBData information = EAI.RetrieveESBData(param);
                    if (information.Result != null && information.Result.Count > 0)
                    {
                        transaction.ATMCardNumber     = information.Result[0]["cardnumber"];
                        transaction.ATMCardHolderName = information.Result[0]["custname"];
                        transaction.Status            = Utility.GetStatusInfo(information.Result[0]["status"]);
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 9
0
        public static CreditCardOutstandingTransaction OutstandingTransactions(Params request)
        {
            CreditCardOutstandingTransaction transaction = new CreditCardOutstandingTransaction();

            try
            {
                if (request.Parameter.ContainsKey("cardNo"))
                {
                    string cardNo = request.Parameter["cardNo"];
                    CreditCardInformation information = CreditCardService.RetrieveCreditCardDetail(cardNo, CreditCardService.RetrieveCreditCardType(cardNo));
                    transaction.CustomerNo = information.CustomerNo;
                    transaction.CreditCards.Add(information);
                    RetrieveCreditCardOutstandingTransactions(cardNo, transaction);
                }
                else if (request.Parameter.ContainsKey("custNo"))
                {
                    Params param = new Params()
                    {
                        Parameter = new Dictionary <string, string>()
                    };
                    param.RequestTransType = "GetAllRelatedCreditCardInOneCustNo";
                    param.Parameter.Add("custNo", request.Parameter["custNo"]);
                    param.WSDL = "AllRelatedDetail";
                    ESBData cardData = EAI.RetrieveESBData(param);
                    transaction.CustomerNo = request.Parameter["custNo"];

                    if (cardData.Result != null && cardData.Result.Count != 0)
                    {
                        foreach (StringDictionary entry in cardData.Result)
                        {
                            string cardno = entry["cardNo"];
                            if (!string.IsNullOrEmpty(cardno))
                            {
                                CreditCardInformation information = CreditCardService.RetrieveCreditCardDetail(cardno, entry["cardType"]);
                                transaction.CreditCards.Add(information);
                                RetrieveCreditCardOutstandingTransactions(cardno, transaction);
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 10
0
        private static CreditCardCurrentTransaction RetrieveCreditCardCurrentTransactions(string cardNo)
        {
            CreditCardCurrentTransaction transaction = new CreditCardCurrentTransaction();

            try
            {
                Params param = new Params()
                {
                    Parameter = new Dictionary <string, string>()
                };
                param.RequestTransType = "GetCurrentCreditCardTransactionByCardNo";
                param.Parameter.Add("cardNo", cardNo);
                param.WSDL = "CCInquiryTransactionDetail";
                ESBData data = EAI.RetrieveESBData(param);

                if (data.Result.Count > 1)
                {
                    data.Result.RemoveAt(0); // Remove the first record as it contains the keys "card", "number" and "appCode"

                    foreach (StringDictionary entry in data.Result)
                    {
                        transaction.Transactions.Add(new CreditCardTransaction()
                        {
                            CreditCardNo    = cardNo,
                            PostingDate     = Formatter.ParseExact(entry[CurrentCreditCardTransactionResultKeyName.PostingDate], "JY"),
                            TransactionDate = Formatter.ParseExact(entry[CurrentCreditCardTransactionResultKeyName.TransactionDate], "JY"),
                            Description     = entry[CurrentCreditCardTransactionResultKeyName.Description],
                            TransactionCode = entry[CurrentCreditCardTransactionResultKeyName.TransactionCode],
                            MerchantCode    = entry[CurrentCreditCardTransactionResultKeyName.MerchantCode],
                            ReferenceNumber = entry[CurrentCreditCardTransactionResultKeyName.ReferenceNumber],
                            Amount          = Formatter.GetParsedDouble(entry[CurrentCreditCardTransactionResultKeyName.Amount], false)
                        });
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 11
0
        public static List <DebitTransaction> Debit(Params request)
        {
            List <DebitTransaction> ResultList = new List <DebitTransaction>();
            Params param = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            param.Parameter.Add("NUM", request.Parameter.ContainsKey("atmNo") ? request.Parameter["atmNo"].Trim() : string.Empty);
            param.Parameter.Add("StartDate", request.Parameter.ContainsKey("startDate") ? request.Parameter["startDate"].Trim() : string.Empty);
            param.Parameter.Add("EndDate", request.Parameter.ContainsKey("endDate") ? request.Parameter["endDate"].Trim() : string.Empty);
            param.Parameter.Add("CRD_LN", request.Parameter.ContainsKey("lnet") ? request.Parameter["lnet"].Trim() : string.Empty);
            param.Parameter.Add("CRD_FIID", request.Parameter.ContainsKey("fiid") ? request.Parameter["fiid"].Trim() : string.Empty);
            if (request.Parameter.ContainsKey("terminalId"))
            {
                param.RequestTransType = "GetDebitTransactionByATMNoWithTerminalID";
                param.Parameter.Add("TERM_ID", request.Parameter["terminalId"].Trim().ToUpper());
            }
            else
            {
                param.RequestTransType = "GetDebitTransactionByATMNo";
            }
            param.WSDL = "ESBDBDelimiter";

            try
            {
                ESBData data = EAI.RetrieveESBData(param);
                if (data.Result != null && data.Result.Count > 0)
                {
                    int counter             = 0;
                    DebitTransaction record = null;
                    foreach (var entry in data.Result)
                    {
                        record = new DebitTransaction();
                        DateTime?transactDate = Formatter.ParseExact(entry["tran_dat"], "yyyy-MM-dd HH:mm:ss");
                        DateTime?transactTime = Formatter.ParseExact(entry["tran_dat"], "yyyy-MM-dd HH:mm:ss");
                        double   amountJumlah = 0;
                        double.TryParse(entry["amt_1"], out amountJumlah);
                        amountJumlah = amountJumlah / 100;
                        double cashJumlahTunai = 0;
                        double.TryParse(entry["amt_2"], out cashJumlahTunai);
                        cashJumlahTunai = cashJumlahTunai / 100;

                        counter++;
                        record.Number          = counter.ToString();
                        record.TransactionCode = entry["transcode"];
                        //record.TransactionDate = transactDate.ToString();
                        //record.TransactionTime = transactTime.ToString();
                        record.TransactionDate = entry["tran_dat"];
                        record.TransactionTime = entry["tran_dat"].Substring(11, 8);
                        record.Amount          = amountJumlah.ToString();
                        record.ResponseCode    = entry["resp_cde"];
                        record.ApprovalCode    = entry["apprv_cde"];
                        record.AtmCardNo       = request.Parameter["atmNo"].Trim();
                        record.TerminalId      = entry["term_term_id"];
                        record.CashAmount      = cashJumlahTunai.ToString();
                        record.AccountNumber   = entry["acct_num"];
                        record.Retailer        = entry["retailer_id"];
                        record.TraceNo         = entry["invoice_num"];
                        record.Batch           = entry["batch_num"];
                        record.SequenceNo      = entry["seq_num"];
                        record.CardType        = entry["crd_typ"];

                        ResultList.Add(record);
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(ResultList);
        }
Exemplo n.º 12
0
        public static KBITransaction KBI(Params request)
        {
            KBITransaction transaction = new KBITransaction();
            ESBData        data        = null;
            Params         param       = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            try
            {
                ESBData information = null;
                if (!(string.IsNullOrEmpty(request.RequestTransType)) && !("GetCreditCardLogIBankByUserId".Equals(request.RequestTransType)))
                {
                    if (request.Parameter.ContainsKey("userId"))
                    {
                        param.RequestTransType = "GetIBankInfoByUserId";
                        param.Parameter.Add("CustId", request.Parameter["userId"]);
                        param.WSDL  = "ESBDBDelimiter";
                        information = EAI.RetrieveESBData(param);
                    }
                    if (request.Parameter.ContainsKey("atmNo"))
                    {
                        param.RequestTransType = "GetIBankInfoByATMNo";
                        param.Parameter.Add("CardNumber", request.Parameter["atmNo"]);
                        param.WSDL  = "ESBDBDelimiter";
                        information = EAI.RetrieveESBData(param);
                    }

                    if (information.Result.Count > 0 && !string.IsNullOrEmpty(information.Result[0]["custid"]))
                    {
                        transaction.UserId       = information.Result[0]["custid"];
                        transaction.CardNumber   = information.Result[0]["cardnumber"];
                        transaction.CustomerName = information.Result[0]["firstname"];
                    }
                }
                else if ("GetCreditCardLogIBankByUserId".Equals(request.RequestTransType))
                {
                    if (request.Parameter.ContainsKey("userId"))
                    {
                        param.RequestTransType = "GetCardNoByUserIdIBank";
                        param.Parameter.Add("KeyId", request.Parameter["userId"]);
                        param.Parameter.Add("No_Kartu", string.Empty);
                        param.Parameter.Add("No_Rekening", string.Empty);
                        param.Parameter.Add("NewStatus", "AKT");
                        param.WSDL               = "ESBDBDelimiter";
                        information              = EAI.RetrieveESBData(param);
                        transaction.UserId       = request.Parameter["userId"];
                        transaction.CardNumber   = information.Result[0]["no_kartu"];
                        transaction.CustomerName = information.Result[0]["firstname"];
                    }
                    else if (request.Parameter.ContainsKey("atmNo"))
                    {
                        param.RequestTransType = "GetUserIdIBankByCardNo";
                        param.Parameter.Add("KeyId", string.Empty);
                        param.Parameter.Add("No_Kartu", request.Parameter["atmNo"]);
                        param.Parameter.Add("No_Rekening", string.Empty);
                        param.Parameter.Add("NewStatus", "AKT");
                        param.WSDL               = "ESBDBDelimiter";
                        information              = EAI.RetrieveESBData(param);
                        transaction.UserId       = information.Result[0]["keyid"];
                        transaction.CardNumber   = request.Parameter["atmNo"];
                        transaction.CustomerName = information.Result[0]["firstname"];
                    }
                }

                param.Parameter        = new Dictionary <string, string>();
                param.RequestTransType = request.RequestTransType;

                param.Parameter.Add("FK_CustID", transaction.UserId);

                switch (param.RequestTransType)
                {
                // ORAIBSELECTLOGTXNPAYMENTPURCHASEBYCUSTID
                case "GetIBTransactionByUserIdPayment":
                    param.Parameter.Add("TxType", "PmtAddRq");
                    break;

                case "GetIBTransactionByUserIdPaymentECommerce":
                    param.Parameter.Add("TxType", "EComAddRq");
                    break;

                case "GetIBTransactionByUserIdVirtualAcct":
                    param.Parameter.Add("TxType", "XFerAddRq4");
                    break;

                case "GetIBTransactionByUserIdPurchase":
                    param.Parameter.Add("TxType", "PchAddRq");
                    break;

                case "GetIBTransactionByUserIdTopUpWallet":
                    param.Parameter.Add("TxType", "XFerAddRq5");
                    break;

                // ORAIBSELECTTXNHISTORYBYCUSTID
                case "GetIBTransactionByUserIdAcctInfo":
                    param.Parameter.Add("Process1", "BalInqRq");
                    param.Parameter.Add("Process2", "DeptAcctStmtInqRq");
                    param.Parameter.Add("Process3", "InvInqRq");
                    param.Parameter.Add("Process4", "InvAcctStmtInqRq");
                    param.Parameter.Add("Process5", "InvAcctStmtInqRq2");
                    break;

                case "GetIBTransactionByUserIdConsumerCreditInfo":
                    param.Parameter.Add("Process1", "LOANINQRQ");
                    param.Parameter.Add("Process2", "LOANHISTINQRQ");
                    param.Parameter.Add("Process3", "");
                    param.Parameter.Add("Process4", "");
                    param.Parameter.Add("Process5", "");
                    break;

                case "GetIBTransactionByUserIdInvesProductInfo":
                    param.Parameter.Add("Process1", "REKSAINQRQ");
                    param.Parameter.Add("Process2", "REKSAINQRQ");
                    param.Parameter.Add("Process3", "");
                    param.Parameter.Add("Process4", "");
                    param.Parameter.Add("Process5", "");
                    break;

                case "GetCreditCardLogIBankByUserId":
                    param.Parameter.Add("Process1", "REGBCACC");
                    param.Parameter.Add("Process2", "DELBCACC");
                    param.Parameter.Add("Process3", "CCSTMTINQRQ");
                    param.Parameter.Add("Process4", "");
                    param.Parameter.Add("Process5", "");
                    break;

                // ORAIBSELECTLOGTXNTRANSFERBYCUSTID
                case "GetIBTransactionByUserIdTransferBCA":
                    param.Parameter.Add("TxType1", "XFerAddRq2");
                    param.Parameter.Add("TxType2", "XFerAddRq3");
                    param.Parameter.Add("EffDt1", "0");
                    param.Parameter.Add("EffDt2", "1");
                    param.Parameter.Add("EffDt3", "");
                    break;

                case "GetIBTransactionByUserIdTransferDomestic":
                    param.Parameter.Add("TxType1", "XFerAddRq3");
                    param.Parameter.Add("TxType2", "");
                    param.Parameter.Add("EffDt1", "1");
                    param.Parameter.Add("EffDt2", "");
                    param.Parameter.Add("EffDt3", "");
                    break;

                case "GetIBTransactionByUserIdAKSesFundWithdrawal":
                    param.Parameter.Add("TxType1", "FundWdrwRq");
                    param.Parameter.Add("TxType2", "");
                    param.Parameter.Add("EffDt1", "0");
                    param.Parameter.Add("EffDt2", "");
                    param.Parameter.Add("EffDt3", "");
                    break;

                // ORAIBSELECTTRANSFERTUNDABYCUSTIDANDTXTDATE
                case "GetIBTransactionByUserIdTransferBCAInputStatus":
                    param.Parameter.Add("TxType", "XFerAddRq3");
                    param.Parameter.Add("Is_Domestic", "0");
                    break;

                case "GetIBTransactionByUserIdTransferDomesticInputStatus":
                    param.Parameter.Add("TxType", "XFerAddRq3");
                    param.Parameter.Add("Is_Domestic", "1");
                    break;

                // ORAIBSELECTTRANSFERTUNDABYCUSTIDANDPROCESSDATE
                case "GetIBTransactionByUserIdTransferBCATxnStatus":
                    param.Parameter.Add("TxType", "XFerAddRq3");
                    param.Parameter.Add("Is_Domestic", "0");
                    break;

                case "GetIBTransactionByUserIdTransferDomesticTxnStatus":
                    param.Parameter.Add("TxType", "XFerAddRq3");
                    param.Parameter.Add("Is_Domestic", "1");
                    break;

                // ORAIBSELECTTRANSFERTOLAKBYCUSTIDANDTXNDATE
                case "GetIBTransactionByUserIdRejected":
                    break;
                }

                param.Parameter.Add("StartDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["startDate"]), "MM/dd/yyyy"));
                param.Parameter.Add("EndDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["endDate"]).AddDays(1), "MM/dd/yyyy"));

                // ORAIBSELECTUSERSESSIONLOGBYCUSTID
                if ("GetIBTransactionByUserIdUserSession".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("ChgFlag", "");
                }

                param.WSDL = "ESBDBDelimiter";

                data = EAI.RetrieveESBData(param);

                if (data.Result != null && data.Result.Count > 0)
                {
                    KBITRX trx = null;
                    foreach (StringDictionary entry in data.Result)
                    {
                        trx = new KBITRX();
                        string tandemStatusCode = string.Empty;
                        string mdlwrStatusCode  = string.Empty;
                        switch (param.RequestTransType)
                        {
                        // ORAIBSELECTLOGTXNPAYMENTPURCHASEBYCUSTID
                        case "GetIBTransactionByUserIdPayment":
                            tandemStatusCode = entry["srvrstatuscode"];
                            DateTime?tandemDate = (tandemStatusCode == "0" || tandemStatusCode == "00" || tandemStatusCode == "97") ? Formatter.ParseExact(entry["tandemtxdate"], "ddMMyyHHmm") : Formatter.ParseExact(entry["tandemtxdate"], "MMddyyHHmm");

                            trx.MiddlewareDate       = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TandemDate           = tandemDate;
                            trx.PaymentAccountNumber = entry["acctidfrom"];
                            trx.CustomerNumber       = entry["billrefinfo"];
                            trx.Nominal          = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.TokenStatus      = entry["flagtoken"];
                            trx.ReferenceNumber  = entry["rqUID"];
                            trx.PaymentFor       = entry["desceng"];
                            break;

                        case "GetIBTransactionByUserIdPaymentECommerce":
                            trx.MiddlewareDate       = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TandemDate           = Formatter.ParseExact(entry["tandemtxdate"], "ddMMyyHHmm");
                            trx.PaymentAccountNumber = entry["acctidfrom"];
                            trx.CustomerNumber       = entry["billrefinfo"];
                            trx.Amount           = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.TokenStatus      = entry["flagtoken"];
                            trx.ReferenceNumber  = entry["rquid"];
                            trx.PaymentFor       = entry["desceng"];
                            break;

                        case "GetIBTransactionByUserIdVirtualAcct":
                            double?forex      = Formatter.GetParsedDouble(entry["currforex"], false);
                            double forexValue = 0;
                            if (forex.HasValue)
                            {
                                forexValue = forex.Value / 100;
                            }
                            trx.TransferDate          = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.InputDate             = Formatter.ParseExact(entry["lateamt"], "yyyy-MM-dd H:mm:ss");
                            trx.TransactionType       = entry["authidresponse"];
                            trx.SenderAccountNo       = entry["acctidfrom"];
                            trx.TransferToAccount     = entry["acctidto"];
                            trx.TransferToAccountName = entry["acctidtoname"];
                            trx.Currency         = Utility.GetCurrency(entry["curr"]);
                            trx.LateChargeAmount = entry["latechargeamt"];
                            trx.TransferAmount   = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.Forex            = forexValue;
                            trx.AmountIDR        = Formatter.GetParsedDouble(entry["amtidr"], false);
                            trx.ToAccountType    = Utility.GetCurrency(entry["accttypeto"]);
                            trx.SendToSubject    = entry["sendtosubject"];
                            trx.Status           = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.Reason           = entry["errormessage"];
                            trx.Reference        = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdPurchase":
                            tandemStatusCode         = entry["srvrStatusCode"];
                            trx.MiddlewareDate       = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TandemDate           = (tandemStatusCode == "0" || tandemStatusCode == "00" || tandemStatusCode == "97") ? Formatter.ParseExact(entry["tandemtxdate"], "ddMMyyHHmm") : Formatter.ParseExact(entry["tandemtxdate"], "MMddyyHHmm");
                            trx.AccountPaymentNumber = entry["acctidfrom"];
                            trx.PaymentFor           = entry["desceng"];
                            trx.Nominal          = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.Token            = entry["flagtoken"];
                            trx.ReferenceNumber  = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdTopUpWallet":
                            trx.TransactionDate   = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.FromAccountNumber = entry["acctidfrom"];
                            trx.ToAccountNoHp     = entry["acctidto"];
                            trx.TransactionType   = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Information Type", entry["txtype"]);
                            trx.Amount            = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.MiddlewareStatus  = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus      = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.FlagToken         = entry["flagtoken"];
                            trx.ReferenceNumber   = entry["rquid"];
                            trx.ToAccountName     = entry["acctidtoname"];
                            trx.Currency          = Utility.GetCurrency(entry["curr"]);
                            trx.Description       = entry["errormessage"];
                            break;

                        // ORAIBSELECTTXNHISTORYBYCUSTID
                        case "GetIBTransactionByUserIdAcctInfo":
                            trx.MiddlewareDate   = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.InformationType  = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Information Type", entry["process"]);
                            trx.AccountNumber    = entry["acctidfrom"];
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.ReferenceNumber  = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdConsumerCreditInfo":
                            trx.MiddlewareDate   = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.InformationType  = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Information Type", entry["process"]);
                            trx.AccountNumber    = entry["acctidfrom"];
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.ReferenceNumber  = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdInvesProductInfo":
                            trx.MiddlewareDate   = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.InformationType  = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Information Type", entry["process"]);
                            trx.AccountNumber    = entry["acctidfrom"];
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus     = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            trx.ReferenceNumber  = entry["rquid"];
                            break;

                        case "GetCreditCardLogIBankByUserId":
                            DateTime?middlewareDate = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.MiddlewareDate   = middlewareDate;
                            trx.Process          = Utility.GetDisplayText("TransactionAttributeMapping", "Kartu Kredit", "Transaction Type", entry["process"]);
                            trx.FromAccountId    = Formatter.GetParsedNumericLong(entry["acctidfrom"], false);
                            trx.MiddlewareStatus = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.ReferenceNo      = entry["rquid"];
                            break;

                        // ORAIBSELECTLOGTXNTRANSFERBYCUSTID
                        case "GetIBTransactionByUserIdTransferBCA":
                            double?exchangeRate = Formatter.GetParsedDouble(entry["currforex"], false);
                            if (exchangeRate.HasValue)
                            {
                                exchangeRate = exchangeRate.Value / 100;
                            }
                            trx.TransferDate        = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.InputDate           = Formatter.ParseExact(entry["lateamt"], "yyyy-MM-dd HH:mm:ss");
                            trx.TransferType        = entry["authidresponse"];
                            trx.FromAccountNumber   = entry["acctidfrom"];
                            trx.ToAccountNumber     = entry["acctidto"];
                            trx.ToAccountName       = entry["acctidtoname"];
                            trx.MUTransaction       = Utility.GetCurrency(entry["curr"]);
                            trx.LateChargeAmount    = entry["latechargeamt"];
                            trx.TransferNominal     = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.ExchangeRate        = exchangeRate;
                            trx.ConversiNominal     = Formatter.GetParsedDouble(entry["amtidr"], false);
                            trx.MUFromAccountNumber = Utility.GetCurrency(entry["accttypeto"]);
                            trx.News            = entry["sendtosubject"];
                            trx.Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.Cause           = entry["errdesc"];
                            trx.ReferenceNumber = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdTransferDomestic":
                            trx.InputDate         = Formatter.ParseExact(entry["lateamt"], "yyyy-MM-dd HH:mm:ss");
                            trx.TransferDate      = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferType      = entry["authidresponse"];
                            trx.FromAccountNumber = entry["acctidfrom"];
                            trx.ToAccountNumber   = entry["acctidto"];
                            trx.ToAccountName     = entry["acctidtoname"];
                            trx.City            = entry["dccustaddress"];
                            trx.Bank            = entry["dcmerchantname"];
                            trx.Branch          = entry["custname"];
                            trx.Citizen         = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Citizen", entry["custstatus"]);
                            trx.WNI             = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "WNI", entry["custbranch"]);
                            trx.Currency        = Utility.GetCurrency(entry["curr"]);
                            trx.TransferNominal = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.Cost            = Formatter.GetParsedDouble(entry["feeamt"], false);
                            trx.News            = entry["sendtosubject"];
                            trx.TransferService = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Service", entry["feecur"]);
                            trx.Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.Reason          = entry["errdesc"];
                            trx.ReferenceNumber = entry["rquid"];
                            break;

                        case "GetIBTransactionByUserIdAKSesFundWithdrawal":
                            trx.TransactionDate   = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.FromAccountNumber = entry["acctidfrom"];
                            trx.UserId            = transaction.UserId;
                            trx.CustomerName      = entry["custname"];
                            trx.Email             = entry["sendtoaddr"];
                            trx.TransactionType   = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Information Type", entry["txtype"]);
                            trx.BillerId          = entry["billerid"];
                            trx.BillerRefInfo     = entry["billrefinfo"];
                            trx.Currency          = Utility.GetCurrency(entry["curr"]);
                            trx.Amount            = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.Reason            = entry["errdesc"];
                            trx.ReferenceNumber   = entry["rquid"];
                            trx.MiddlewareStatus  = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Middleware Status", entry["statuscode"]);
                            trx.TandemStatus      = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "KlikBCA Individual", "Tandem Status", entry["srvrstatuscode"]);
                            break;

                        // ORAIBSELECTTRANSFERTUNDABYCUSTIDANDTXTDATE
                        case "GetIBTransactionByUserIdTransferBCAInputStatus":
                            trx.InputDate            = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferDate         = Formatter.ParseExact(entry["xfer_process_dt"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferType         = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Type", entry["xfer_type"]);
                            trx.Periodic             = entry["xfer_desc"];
                            trx.ExpiredDate          = Formatter.ParseExact(entry["xfer_expire_dt"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.AccountSendersNumber = entry["acctidfrom"];
                            trx.ToAccountNumber      = entry["acctidto"];
                            trx.ToAccountName        = entry["acctidtoname"];
                            trx.Currency             = Utility.GetCurrency(entry["curr"]);
                            trx.TransferNominal      = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.News   = entry["sendToSubject"];
                            trx.Status = entry["xfer_status"];
                            break;

                        case "GetIBTransactionByUserIdTransferDomesticInputStatus":
                            trx.InputDate         = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferDate      = Formatter.ParseExact(entry["xfer_process_dt"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferType      = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Type", entry["xfer_type"]);
                            trx.FromAccountNumber = entry["acctidfrom"];
                            trx.ToAccountNumber   = entry["acctidto"];
                            trx.ToAccountName     = entry["acctidtoname"];
                            trx.City             = entry["bank_city"];
                            trx.Branch           = entry["bank_br_nm"];
                            trx.Bank             = entry["bank_nm"];
                            trx.Citizen          = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Citizen", entry["status_pend"]);
                            trx.WNI              = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "WNI", entry["status_wn"]);
                            trx.Currency         = Utility.GetCurrency(entry["curr"]);
                            trx.NominalTransfers = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.Fee              = Formatter.GetParsedDouble(entry["fee_amt"], false);
                            trx.News             = entry["sendtosubject"];
                            trx.ServiceTransfer  = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Service", entry["is_llg"]);
                            trx.Status           = entry["xfer_status"];
                            break;

                        // ORAIBSELECTTRANSFERTUNDABYCUSTIDANDPROCESSDATE
                        case "GetIBTransactionByUserIdTransferBCATxnStatus":
                            trx.InputDate    = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferDate = Formatter.ParseExact(entry["xfer_process_dt"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferType = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Type", entry["xfer_type"]);
                            trx.Periodic     = entry["xfer_desc"];
                            //trx.ExpiredDate = Formatter.ParseExact(entry["xfer_expire_dt"], "yyyy-MM-dd hh:mm:ss tt");
                            string[] xdate      = entry["xfer_expire_dt"].Split(' ');
                            string[] dtx        = xdate[0].Split('-');
                            string   expired_dt = dtx[1] + "/" + dtx[2] + "/" + dtx[0] + " " + "12:00:00 PM";
                            trx.ExpiredDate          = Formatter.ParseExact(expired_dt, "MM/dd/yyyy hh:mm:ss tt");
                            trx.AccountSendersNumber = entry["acctidfrom"];
                            trx.ToAccountNumber      = entry["acctidto"];
                            trx.ToAccountName        = entry["acctidtoname"];
                            trx.Currency             = Utility.GetCurrency(entry["curr"]);
                            trx.TransferNominal      = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.News   = entry["sendtosubject"];
                            trx.Status = entry["xfer_status"];
                            break;

                        case "GetIBTransactionByUserIdTransferDomesticTxnStatus":
                            trx.InputDate         = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.TransferDate      = Formatter.ParseExact(entry["xfer_expire_dt"], "yyyy-MM-dd H:mm:ss");
                            trx.TransferType      = entry["xfer_type"];
                            trx.FromAccountNumber = entry["acctidfrom"];
                            trx.ToAccountNumber   = entry["acctidto"];
                            trx.ToAccountName     = entry["acctidtoname"];
                            trx.City             = entry["bank_city"];
                            trx.Bank             = entry["bank_nm"];
                            trx.Branch           = entry["bank_br_nm"];
                            trx.Citizen          = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Citizen", entry["status_pend"]);
                            trx.WNI              = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "WNI", entry["status_wn"]);
                            trx.Currency         = Utility.GetCurrency(entry["curr"]);
                            trx.NominalTransfers = Formatter.GetParsedDouble(entry["amt"], false);
                            trx.Fee              = Formatter.GetParsedDouble(entry["fee_amt"], false);
                            trx.News             = entry["sendtosubject"];
                            trx.ServiceTransfer  = Utility.GetDisplayText("TransactionAttributeMapping", "KlikBCA Individual", "Transfer Service", entry["is_llg"]);
                            trx.Status           = entry["xfer_status"];
                            break;

                        // ORAIBSELECTTRANSFERTOLAKBYCUSTIDANDTXNDATE
                        case "GetIBTransactionByUserIdRejected":
                            trx.InputDate         = Formatter.ParseExact(entry["xfer_posting_dt"], "MM/dd/yyyy hh:mm:ss t");
                            trx.TransferDate      = Formatter.ParseExact(entry["tanggal_transaksi"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.PPUNumber         = entry["nomor_ppu"];
                            trx.FromAccountNumber = entry["nomor_rek_pengirim"];
                            trx.ToAccountNumber   = entry["nomor_rek_penerima"];
                            trx.ToAccountName     = entry["nama_penerima"];
                            trx.City             = entry["bank_city"];
                            trx.Bank             = entry["bank_name"];
                            trx.NominalTransfers = Formatter.GetParsedDouble(entry["nominal"], false);
                            trx.Reason           = entry["alasan_penolakan"];
                            break;

                        // ORAIBSELECTUSERSESSIONLOGBYCUSTID
                        case "GetIBTransactionByUserIdUserSession":
                            DateTime?createdDate = Formatter.ParseExact(entry["created_date"], "MM/dd/yyyy hh:mm:ss tt");
                            DateTime?signOnDate  = Formatter.ParseExact(entry["signon_time"], "MM/dd/yyyy hh:mm:ss tt");
                            DateTime?signOffDate = Formatter.ParseExact(entry["signoff_time"], "MM/dd/yyyy hh:mm:ss tt");
                            trx.Number          = entry["pk_id"];
                            trx.TransactionDate = createdDate;
                            trx.SignOnDate      = signOnDate;
                            trx.SignOffDate     = signOffDate;
                            break;
                        }
                        transaction.Transactions.Add(trx);
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 13
0
        public JsonResult LoadGrid(string sidx, string sord, int rows, int page = 1)
        {
            string   getType      = Request["_type"];
            string   getVal       = Request["_val"];
            string   getTujuan    = "%" + Request["_tujuan"] + "%";
            string   getStartDate = Request["_startDate"];
            string   getEndDate   = Request["_endDate"];
            DateTime sd;

            if (!DateTime.TryParse(getStartDate, out sd))
            {
                // handle parse failure
            }
            else
            {
                getStartDate = sd.ToString("MM/dd/yyyy HH:mm:ss");
            }
            if (!DateTime.TryParse(getEndDate, out sd))
            {
                // handle parse failure
            }
            else
            {
                getEndDate = sd.DayMax().ToString("MM/dd/yyyy HH:mm:ss");
            }

            Params paramList = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };
            ESBData esbData = new ESBData()
            {
                Result = new List <StringDictionary>()
            };

            Object[] data         = new Object[1];
            int      pageSize     = 0;
            int      totalRecords = 0;
            int      totalPages   = 0;

            bool checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailInbox", "SPV");

            switch (checkSpv)
            {
            case true:
                paramList.RequestTransType = "InqReceivedEmailforSPV";
                paramList.Parameter.Add("UserLoc1", "INBX");
                paramList.Parameter.Add("UserLoc2", " ");
                paramList.Parameter.Add("StartDate", getStartDate);
                paramList.Parameter.Add("EndDate", getEndDate);
                paramList.Parameter.Add("CustId", getTujuan);
                break;

            case false:
                string      dateString, format;
                DateTime    result;
                CultureInfo provider = CultureInfo.InvariantCulture;
                // Parse date-only value with invariant culture.
                format = "MM/dd/yyyy HH:mm:ss";         // h for 12 hour format, HH dor 24 hour format
                try
                {
                    result       = DateTime.ParseExact(getStartDate, format, provider);
                    getStartDate = result.ToString("MM/dd/yyyy");

                    result     = DateTime.ParseExact(getEndDate, format, provider);
                    getEndDate = result.AddDays(1).ToString("MM/dd/yyyy");
                }
                catch (FormatException)
                {
                    //Console.WriteLine("{0} is not in the correct format.", dateString);
                }
                paramList.RequestTransType = "InqReceivedEmailforOPR";
                paramList.Parameter.Add("AgentId", Session["DomainUserName"].ToString());
                paramList.Parameter.Add("UserLoc1", "INBX");
                paramList.Parameter.Add("UserLoc2", " ");
                paramList.Parameter.Add("StartDate", getStartDate.Substring(0, 10));
                paramList.Parameter.Add("EndDate", getEndDate.Substring(0, 10));
                paramList.Parameter.Add("CustId", getTujuan);
                break;
            }

            paramList.WSDL = "ESBDBDelimiter";

            List <EmailOutbox> listEmailOutboxs = new List <EmailOutbox>();

            esbData = EAI.RetrieveESBData(paramList);

            if (esbData != null && esbData.Result.Count != 0)
            {
                foreach (StringDictionary kvp in esbData.Result)
                {
                    EmailOutbox model = new EmailOutbox();
                    model.Id             = kvp[EmailOutboxMapping.refNo];
                    model.NoReferensi    = kvp[EmailOutboxMapping.refNo];
                    model.Tujuan         = kvp[EmailOutboxMapping.custId];
                    model.Subject        = kvp[EmailOutboxMapping.subject];
                    model.SpvAppv        = kvp[EmailOutboxMapping.supervisorId];
                    model.StatusTerakhir = kvp[EmailOutboxMapping.agentSpvLoc];
                    model.Tanggal        = kvp[EmailOutboxMapping.createdDate];

                    string      dateString, format;
                    DateTime    result;
                    CultureInfo provider = CultureInfo.InvariantCulture;

                    // Parse date-only value with invariant culture.
                    dateString = model.Tanggal;
                    format     = "M/d/yyyy h:mm:ss tt"; // h for 12 hour format, HH dor 24 hour format
                    try
                    {
                        result = DateTime.ParseExact(dateString, format, provider);
                        Console.WriteLine("{0} converts to {1}.", dateString, result.ToString());
                        model.Tanggal = result.ToString("dd/MM/yyyy HH:mm:ss");
                    }
                    catch (FormatException)
                    {
                        Console.WriteLine("{0} is not in the correct format.", dateString);
                    }

                    listEmailOutboxs.Add(model);
                }
            }
            else
            {
                //ViewBag.Message = esbData.Message;
            }
            var tempOutbox = listEmailOutboxs
                             .Select(x => new
            {
                Id             = x.Id,
                NoReferensi    = x.NoReferensi,
                Tujuan         = x.Tujuan,
                Subject        = x.Subject,
                Tanggal        = x.Tanggal,
                SpvAppv        = x.SpvAppv,
                StatusTerakhir = x.StatusTerakhir
            }).AsQueryable();

            pageSize     = rows;
            totalRecords = tempOutbox.Count();
            totalPages   = (int)Math.Ceiling((float)totalRecords / (float)pageSize);

            tempOutbox = tempOutbox.OrderBy(sidx + " " + sord).Skip((page - 1) * pageSize).Take(pageSize);
            data       = tempOutbox.ToArray();


            var       recordCount = totalRecords;
            JSONTable jTable      = new JSONTable();

            jTable.total   = totalPages;
            jTable.page    = page;
            jTable.records = recordCount;
            jTable.rows    = data;

            return(Json(jTable, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 14
0
        public static SMSBCATransaction SMSBCA(Params request)
        {
            SMSBCATransaction transaction = new SMSBCATransaction();
            Params            param       = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            try
            {
                param.RequestTransType = request.RequestTransType;
                param.Parameter.Add("CustId", request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);
                param.Parameter.Add("StartDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["startDate"]), "MM/dd/yyyy"));
                param.Parameter.Add("EndDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["endDate"]).AddDays(1), "MM/dd/yyyy"));
                param.Parameter.Add("Proses", "GetSMSTransactionInfoSaldo".Equals(param.RequestTransType) ? "SMSBAccGetBalanceRq" :
                                    "GetSMSTransactionInfoMutasi".Equals(param.RequestTransType) ? "SMSBAcctStmtRq" :
                                    "GetSMSTransactionInfoCoupon".Equals(param.RequestTransType) ? "SMSBInqCouponRq" :
                                    "GetSMSTransactionInfoPayment".Equals(param.RequestTransType) ? "SMSBLPGRQ" :
                                    string.Empty);
                param.WSDL = "ESBDBDelimiter";
                ESBData data = EAI.RetrieveESBData(param);
                if (data.Result != null && data.Result.Count > 0)
                {
                    foreach (StringDictionary entry in data.Result)
                    {
                        DateTime? transactionDate = Convert.ToDateTime(entry["createddate"]);
                        string    status          = entry["srvrstatuscode"];
                        SMSBCATRX trx             = new SMSBCATRX();

                        trx.TransactionDate = transactionDate;
                        trx.AccountNumber   = entry["acctidfrom"];
                        trx.TransactionType = Utility.GetDisplayText("TransactionAttributeMapping", "SMS BCA", "Transaction Type", entry["process"]);
                        trx.ResponseCode    = Utility.GetDisplayText("TransactionAttributeMapping", "SMS BCA", "Response Code", status);
                        trx.Amount          = Formatter.GetParsedDouble(entry["amt"], false);

                        /* Payment Menu
                         * 07 12 2016 - LPG
                         * Tanggal Transaksi       createddate                 TransactionDate
                         * No Rekening             acctidfrom                  AccountNumber
                         * No Referensi            refcode                     ReferenceNumber
                         * Jenis Transaksi         process -company_name       TransactionType + string
                         * Nominal (IDR)           amt                         Amount
                         * Status                  srvrstatuscode - rquid      ResponseCode + string
                         * Pembayar                billerid                    Biller
                         * Penerima                authidresponse [0]          Receiver
                         * Jumlah                  authidresponse [1]          Total
                         * Informasi Lain          authidresponse [2]          Other
                         */

                        if ("GetSMSTransactionInfoPayment".Equals(param.RequestTransType))
                        {
                            trx.ReferenceNumber  = entry["refcode"];
                            trx.TransactionType += " - " + entry["company_name"];
                            trx.ResponseCode    += " - " + entry["rquid"];
                            trx.Biller           = entry["billerid"];
                            string[] authidresp = entry["authidresponse"].Split('|');
                            if (authidresp.Length == 3)
                            {
                                trx.Receiver = authidresp[0];
                                trx.Total    = authidresp[1];
                                trx.Other    = authidresp[2].Length == 8 ? Utility.FormatDateAuth(authidresp[2]) : authidresp[2];
                            }
                        }

                        transaction.Transactions.Add(trx);
                    }

                    param.Parameter        = new Dictionary <string, string>();
                    param.RequestTransType = "GetSMSBankingInfoByMobileNo";
                    param.Parameter.Add("CustId", request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);
                    param.WSDL = "ESBDBDelimiter";
                    ESBData information = EAI.RetrieveESBData(param);
                    if (information.Result != null && information.Result.Count > 0)
                    {
                        transaction.ATMCardHolderName = information.Result[0]["custname"];
                        transaction.ATMCardNumber     = information.Result[0]["cardnumber"];
                        transaction.Status            = Utility.GetStatusInfo(information.Result[0]["status"]);
                    }
                }
            }
            catch (Exception e)
            {
            }

            return(transaction);
        }
Exemplo n.º 15
0
        public ActionResult SingleView(Guid id)
        {
            bool hasAccess   = RoleNPrivilege.HasAccess(new Guid(Session["RoleID"].ToString()), "Customer");
            int  gridMaxRows = Convert.ToInt32(ConfigurationManager.AppSettings["GridMaxRows"].ToString());

            ViewBag.GridMaxRows = gridMaxRows;

            if (hasAccess)
            {
                Customer          model          = db.customer.Find(id);
                List <CreditCard> creditcardList = new List <CreditCard>();
                List <Deposit>    depositList    = new List <Deposit>();
                List <Loan>       loanList       = new List <Loan>();
                List <Channel>    channelList    = new List <Channel>();

                List <KeyValuePair <int, string> > results = new List <KeyValuePair <int, string> >();
                Params paramProductList = new Params()
                {
                    Parameter = new Dictionary <string, string>()
                };
                Params paramChannelList = new Params()
                {
                    Parameter = new Dictionary <string, string>()
                };

                DBServices dbservices = new DBServices();

                paramProductList.WSDL = "CustomerProductListInquiry";
                if (string.IsNullOrEmpty(model.CISNumber) ||
                    model.CISNumber.StartsWith("C", true, CultureInfo.InvariantCulture)
                    //|| customer.GenderCode == 200000 // commented for a while
                    )
                {
                    paramProductList.RequestTransType = "SearchAllProductsByCustCC";
                    paramProductList.Parameter.Add("custNo", model.CreditCardCustomerNo);
                }
                else
                {
                    paramProductList.RequestTransType = "SearchAllProductsByCIS";
                    paramProductList.Parameter.Add("cisNo", model.CISNumber);
                }

                ESBData esbProduct = new ESBData()
                {
                    Result = new List <StringDictionary>()
                };
                esbProduct = EAI.RetrieveESBData(paramProductList);
                if (esbProduct.Result != null && esbProduct.Result.Count() > 0)
                {
                    dbservices.GetProducts(model, esbProduct.Result, null, out creditcardList, out depositList, out loanList);
                }
                else
                {
                    ViewBag.Message = esbProduct.Message;
                }

                paramChannelList.WSDL = "CustomerChannelListInquiry";
                if (string.IsNullOrEmpty(model.CISNumber) ||
                    model.CISNumber.StartsWith("C", true, CultureInfo.InvariantCulture))
                {
                    paramChannelList.RequestTransType = "SearchAllChannelsByCustCC";
                    paramChannelList.Parameter.Add("cisNo", "");
                    paramChannelList.Parameter.Add("custNo", model.CreditCardCustomerNo);
                }
                else
                {
                    paramChannelList.RequestTransType = "SearchAllChannelsByCIS";
                    paramChannelList.Parameter.Add("cisNo", model.CISNumber);
                    paramChannelList.Parameter.Add("custNo", "");
                }
                ESBData esbChannel = EAI.RetrieveESBData(paramChannelList);
                if (esbChannel.Result != null && esbChannel.Result.Count() > 0)
                {
                    dbservices.GetChannel(model, esbChannel.Result, out channelList);
                }
                else
                {
                    ViewBag.Message = esbChannel.Message;
                }

                // DEPOSIT
                var modelDeposit = (from x in depositList
                                    select new
                {
                    Id = x.Id,
                    CustomerId = x.CustomerId,
                    CustomerIdName = x.CustomerIdName,
                    AccountNo = x.AccountNo,
                    AccountTypeIdCode = x.AccountTypeIdCode,
                    AccountTypeIdName = x.AccountTypeIdName,
                    CardNo = x.CardNo,
                    CardTypeIdName = x.CardTypeIdName,
                    OwnerTypeLabel = x.OwnerTypeLabel,
                    RelationType = x.RelationType,
                    RelationshipWith = x.RelationshipWith
                });

                // CREDIT CARD
                var modelCreditCard = (from x in creditcardList
                                       group x by x.Id into y
                                       select new
                {
                    Id = y.Key,
                    CreditCardNumber = y.Select(z => z.CreditCardNumber).FirstOrDefault(),
                    CardholderName = y.Select(z => z.CardholderName).FirstOrDefault(),
                    CardType = y.Select(z => z.CardType).FirstOrDefault(),
                    CCType = y.Select(z => z.CCType).FirstOrDefault(),
                    CreditCardCustomerNo = y.Select(z => z.CreditCardCustomerNo).FirstOrDefault(),
                    CustomerId = y.Select(z => z.CustomerId).FirstOrDefault(),
                    CustomerIdName = y.Select(z => z.CustomerIdName).FirstOrDefault(),
                    Status = y.Select(z => z.Status).FirstOrDefault()
                });

                // LOAN
                var modelLoan = loanList
                                .OrderBy(x => x.AccountNo)
                                .ThenBy(x => x.LoanTypeIdCode)
                                .ThenBy(x => x.LoanNumber);

                // CHANNEL
                var modelChannel = channelList
                                   .OrderBy(x => x.ChannelType)
                                   .ThenBy(x => x.Id);



                ViewBag.DepositModel      = modelDeposit;
                ViewBag.DepositModelCount = modelDeposit.Count();
                if (ViewBag.DepositModelCount > gridMaxRows)
                {
                    ViewBag.DepositModel = modelDeposit.Take(gridMaxRows);
                }

                ViewBag.CreditCardModel      = modelCreditCard;
                ViewBag.CreditCardModelCount = modelCreditCard.Count();
                if (ViewBag.CreditCardModelCount > gridMaxRows)
                {
                    ViewBag.CreditCardModel = modelCreditCard.Take(gridMaxRows);
                }

                ViewBag.LoanModel      = modelLoan;
                ViewBag.LoanModelCount = modelLoan.Count();
                if (ViewBag.LoanModelCount > gridMaxRows)
                {
                    ViewBag.LoanModel = modelLoan.Take(gridMaxRows);
                }

                ViewBag.ChannelModel      = modelChannel;
                ViewBag.ChannelModelCount = modelChannel.Count();

                ViewBag.CustomerId     = model.CustomerID;
                ViewBag.CustomerIdName = model.FullName;
                ViewBag.CISNumber      = model.CISNumber;
                ViewBag.hasAccess      = 1;
            }
            else
            {
                ViewBag.hasAccess = 0;
            }
            return(View());
        }
Exemplo n.º 16
0
        public static MBCATransaction MBCA(Params request)
        {
            MBCATransaction transaction = new MBCATransaction();
            Params          param       = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };
            string dateFormat = string.Empty;

            try
            {
                param.RequestTransType = request.RequestTransType;

                dateFormat = "GetMBTransactionOTP".Equals(param.RequestTransType) ? "dd-MM-yyyy" : "MM/dd/yyyy";

                param.Parameter.Add("GetMBTransactionOTP".Equals(param.RequestTransType) ? "CustomerID" : "FK_CustID",
                                    request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);

                if ("GetMBTransactionMCommerce".Equals(param.RequestTransType) || "GetMBTransactionMPayment".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("TxType", "MBAccExecPaymentRq");
                }
                if ("GetMBTransactionMTransfer".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("TxType1", "MBAccXFerExecRq");
                    param.Parameter.Add("TxType2", "MBAccGetCustomerInfo");
                }
                if ("GetMBTransactionMInfo".Equals(param.RequestTransType))
                {
                    // MBGetInfoCC - Info KK
                    param.Parameter.Add("Process1", "MBAccGetBalanceRq");               // Info Saldo
                    param.Parameter.Add("Process2", "MBAcctStmtRq");                    // Mutasi Rekening
                    param.Parameter.Add("Process3", "MBGetAcctStmtCCRq");               // Info Transaksi KK
                    param.Parameter.Add("Process4", "MBGetBalanceCCR");                 // Info Saldo KK
                    param.Parameter.Add("Process5", "MBGetBalanceDepR");                // Info Deposito
                    param.Parameter.Add("Process6", "MBGetBalReksaDanaRq ");            // Info Saldo Reksadana
                    param.Parameter.Add("Process7", "MBGetBankCod");                    // Info Kode Bank
                    param.Parameter.Add("Process8", "MBGetCompCod");                    // Info Kode Perusahaan
                    param.Parameter.Add("Process9", "MBGetExChgRateRq");                // Info Kurs
                    param.Parameter.Add("Process10", "MBGetKreditKonsumerRq");          // Info Kredit Konsumer
                    param.Parameter.Add("Process11", "MBGetNABReksaDanaRq ");           // Info NAB Reksadana
                    param.Parameter.Add("Process12", "MBInqCouponR");                   // Info Kupon
                    param.Parameter.Add("Process13", "MBIntRateDepIDRRq");              // Info Suku Bunga Deposito Rupiah
                    param.Parameter.Add("Process14", "MBIntRateDepValRq");              // Info Suku Bunga Deposito Valas
                    param.Parameter.Add("Process15", "MBIntRateSavingRq");              // Info Suku Bunga Tabungan
                    param.Parameter.Add("Process16", "MBRDNAcctStmtRq");                // Saldo RDN
                    param.Parameter.Add("Process17", "MBRDNGetBalanceRq");              // Info Mutasi RDN
                    param.Parameter.Add("Process18", "MBVerPIN");                       // Verifikasi PIN
                }
                if ("GetMBTransactionMAdmin".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("Proses1", "MBBlockATMCardRq");                 // Blokir Kartu ATM
                    param.Parameter.Add("Proses2", "MBBlockCCRq");                      // Kartu Kredit
                    param.Parameter.Add("Proses3", "MBCCActivationConnectionRq");       // Koneksi KK setelah Aktivasi
                    param.Parameter.Add("Proses4", "MBCCActivationRq");                 // Aktivasi Kartu Kredit
                    param.Parameter.Add("Proses5", "MBChangePINRq");                    // Ganti PIN
                    param.Parameter.Add("Proses6", "MBDelBCACCRq");                     // Hapus KK
                    param.Parameter.Add("Proses7", "MBDelPaymentListRq");               // Hapus Daftar Pembayaran
                    param.Parameter.Add("Proses8", "MBDelSAKUListRq");                  // Daftar Transfer Sakuku
                    param.Parameter.Add("Proses9", "MBDelTranferListRq");               // Hapus Daftar Transfer Antar Rek
                    param.Parameter.Add("Proses10", "MBDelTranferSwitchingListRq");     // Daftar Transfer Antar Bank
                    param.Parameter.Add("Proses11", "MBDelVAListRq");                   // Hapus Daftar Transfer VA
                    param.Parameter.Add("Proses12", "MBLoginBlockATMCardRq");           // Login Blokir Kartu ATM
                    param.Parameter.Add("Proses13", "MBPINCCActivationRq");             // PIN Kartu Kredit
                    param.Parameter.Add("Proses14", "MBRegBCACCRq");                    // Registrasi KK
                    param.Parameter.Add("Proses15", "ActivationRq");                    // Aktivasi
                    param.Parameter.Add("Proses16", "");
                    param.Parameter.Add("Proses17", "");
                    param.Parameter.Add("Proses18", "");
                }

                param.Parameter.Add("StartDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["startDate"]), dateFormat));
                param.Parameter.Add("EndDate", Formatter.ToStringExact(Convert.ToDateTime(request.Parameter["endDate"]).AddDays(1), dateFormat));

                if ("GetMBTransactionMCommerce".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("PaidType", "PURCHASE");
                }
                if ("GetMBTransactionMPayment".Equals(param.RequestTransType))
                {
                    param.Parameter.Add("PaidType", "PAYMENT");
                }

                param.WSDL = "GetMBTransactionOTP".Equals(param.RequestTransType) ? "OTPCashOut" : "ESBDBDelimiter";

                ESBData data = EAI.RetrieveESBData(param);

                if (data.Result != null && data.Result.Count > 0)
                {
                    foreach (StringDictionary entry in data.Result)
                    {
                        DateTime?middlewareDate = Formatter.ParseExact(entry["txt_date"], "MM/dd/yyyy hh:mm:ss tt");
                        DateTime?tandemDate     = Formatter.ParseExact(entry["tandemtxdate"], "ddMMHHmmss");

                        switch (param.RequestTransType)
                        {
                        case "GetMBTransactionMCommerce":
                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate  = Formatter.ToStringExact(middlewareDate, "dd/MM/yyyy HH:mm:ss"),
                                TandemDate      = Formatter.ToStringExact(tandemDate, "dd/MM HH:mm:ss"),
                                ATMCardNumber   = entry["cardacctid"],
                                AccountNumber   = entry["acctidfrom"],
                                CustomerNumber  = entry["billreffinfo"],
                                PaymentType     = entry["desceng"],
                                Nominal         = Formatter.GetParsedDouble(entry["amt"], false),
                                Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Middleware Status", entry["statuscode"]),
                                DescCode        = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Tandem Status", entry["srvrstatuscode"]),
                                Information     = entry["dccustaddress"],
                                ReferenceNumber = entry["refcode"]
                            });
                            break;

                        case "GetMBTransactionMPayment":
                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate       = Formatter.ToStringExact(middlewareDate, "dd/MM/yyyy HH:mm:ss"),
                                TandemDate           = Formatter.ToStringExact(tandemDate, "dd/MM HH:mm:ss"),
                                ATMCardNumber        = entry["cardacctid"],
                                PaymentAccountNumber = entry["acctidfrom"],
                                CustomerNumber       = entry["billreffinfo"],
                                PaymentFor           = entry["desceng"],
                                Nominal         = Formatter.GetParsedDouble(entry["amt"], false),
                                Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Middleware Status", entry["statuscode"]),
                                DescCode        = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Tandem Status", entry["srvrstatuscode"]),
                                Information     = entry["dccustaddress"],
                                ReferenceNumber = entry["refcode"]
                            });
                            break;

                        case "GetMBTransactionMTransfer":
                            string reqId           = string.IsNullOrEmpty(entry["rquid"]) ? string.Empty : entry["rquid"];
                            string billerAccountId = string.IsNullOrEmpty(entry["billeracctid"]) ? string.Empty : entry["billeracctid"];
                            string statusCode      = entry["statuscode"];
                            double?kurs            = 0;
                            double?amount          = 0;
                            double?amountForx      = 0;
                            string currency        = Utility.GetCurrency(entry["curr"]);

                            if (statusCode == "00" && !string.IsNullOrEmpty(entry["forexrateamt"]))
                            {
                                kurs = Formatter.GetParsedDouble(entry["forexrateamt"], false);
                            }

                            if (((statusCode != "00" && currency == "360") || statusCode == "00") && !string.IsNullOrEmpty(entry["amtidr"]))
                            {
                                amount = Formatter.GetParsedDouble(entry["amtidr"], false);
                            }

                            if (((statusCode != "00" && currency == "360") || statusCode == "00") && !string.IsNullOrEmpty(entry["amtforex"]))
                            {
                                amountForx = Formatter.GetParsedDouble(entry["amtforex"], false);
                            }

                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate       = Formatter.ToStringExact(middlewareDate, "dd/MM/yyyy HH:mm:ss"),
                                TandemDate           = Formatter.ToStringExact(tandemDate, "dd/MM HH:mm:ss"),
                                ATMCardNumber        = entry["cardacctid"],
                                AccountSendersNumber = entry["acctidfrom"],
                                CodeAndBankName      = billerAccountId + reqId,
                                ToAccountNumber      = entry["acctidto"],
                                ToAccountMU          = Utility.GetCurrency(entry["acctcurrto"]),
                                ToAccountName        = entry["acctidtoname"],
                                Currency             = currency,
                                Amount          = amount,
                                AmountForex     = amountForx,
                                ExchangesRate   = kurs,
                                Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Middleware Status", entry["statuscode"]),
                                DescCode        = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Tandem Status", entry["srvrstatuscode"]),
                                Information     = entry["dccustaddress"],
                                ReferenceNumber = entry["refcode"]
                            });
                            break;

                        case "GetMBTransactionMInfo":
                            middlewareDate = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate  = Formatter.ToStringExact(middlewareDate, "dd/MM/yyyy HH:mm:ss"),
                                TransactionType = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Transaction Type", entry["process"]),
                                ATMCardNumber   = entry["cardnumber"],
                                AccountNumber   = entry["acctidfrom"],
                                CustomerName    = entry["custname"],
                                Status          = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Middleware Status", entry["statuscode"]),
                                DescCode        = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Tandem Status", entry["srvrstatuscode"]),
                                Information     = entry["rquid"]
                            });
                            break;

                        case "GetMBTransactionMAdmin":
                            middlewareDate = Formatter.ParseExact(entry["createddate"], "MM/dd/yyyy hh:mm:ss tt");
                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate = Formatter.ToStringExact(middlewareDate, "MM/dd/yyyy HH:mm:ss"),
                                AdminType      = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Admin Type", entry["process"]),
                                ATMCardNumber  = entry["cardnumber"],
                                CustomerName   = entry["custname"],
                                Status         = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Middleware Status", entry["statuscode"]),
                                DescCode       = Utility.GetMiddlewareTandemStatus("TransactionAttributeMapping", "M-BCA", "Tandem Status", entry["srvrstatuscode"]),
                                Information    = entry["rquid"]
                            });
                            break;

                        case "GetMBTransactionOTP":
                            transaction.Transactions.Add(new MBTRX()
                            {
                                MiddlewareDate = entry["CreatedDate"],
                                Status         = entry["Status"],
                                ATMCardNumber  = entry["CardNumber"],
                                TandemDate     = entry["TransactionDate"],
                                AccountNumber  = entry["AccountNumber"],
                                Amount         = Formatter.GetParsedDouble(entry["Amount"], false)
                            });
                            break;
                        }
                    }

                    param.Parameter        = new Dictionary <string, string>();
                    param.RequestTransType = "GetMBankInfoByMobileNo";
                    param.Parameter.Add("CustId", request.Parameter.ContainsKey("mobileNo") ? request.Parameter["mobileNo"].Trim() : string.Empty);
                    param.WSDL = "ESBDBDelimiter";
                    ESBData information = EAI.RetrieveESBData(param);
                    if (information.Result != null && information.Result.Count > 0)
                    {
                        transaction.ATMCardNumber = information.Result[0]["cardnumber"];
                        transaction.CustomerName  = information.Result[0]["custname"];
                        transaction.Status        = Utility.GetStatusInfo(information.Result[0]["status"]);

                        param.Parameter        = new Dictionary <string, string>();
                        param.RequestTransType = "GetTandemStatusMBank";
                        param.Parameter.Add("atmNo", information.Result[0]["cardnumber"]);
                        param.Parameter.Add("mobileNo", request.Parameter["mobileNo"]);
                        param.WSDL = "MBManagement";
                        ESBData tandem = EAI.RetrieveESBData(param);
                        transaction.HandPhoneNumberOnTandem = tandem.Result[0][MobileBankingTandemInquiryStatusResultKeyName.MobileNo];
                        transaction.CustomerNameTandem      = tandem.Result[0][MobileBankingTandemInquiryStatusResultKeyName.CustomerName];
                        transaction.StatusTandem            = Utility.GetStatusInfo(tandem.Result[0][MobileBankingTandemInquiryStatusResultKeyName.UserIdStatus]);
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(transaction);
        }
Exemplo n.º 17
0
        public static List <ATMTransaction> ATM(Params request)
        {
            List <ATMTransaction> ResultList = new List <ATMTransaction>();
            Params param = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };

            param.Parameter.Add("NUM", request.Parameter.ContainsKey("atmNo") ? request.Parameter["atmNo"].Trim() : string.Empty);
            param.Parameter.Add("StartDate", request.Parameter.ContainsKey("startDate") ? request.Parameter["startDate"].Trim() : string.Empty);
            param.Parameter.Add("EndDate", request.Parameter.ContainsKey("endDate") ? request.Parameter["endDate"].Trim() : string.Empty);
            param.Parameter.Add("CRD_LN", request.Parameter.ContainsKey("lnet") ? request.Parameter["lnet"].Trim() : string.Empty);
            param.Parameter.Add("CRD_FIID", request.Parameter.ContainsKey("fiid") ? request.Parameter["fiid"].Trim() : string.Empty);
            if (request.Parameter.ContainsKey("terminalId"))
            {
                param.RequestTransType = "GetATMTransactionByATMNoWithTerminalID";
                param.Parameter.Add("TERM_ID", request.Parameter["terminalId"].Trim().ToUpper());
            }
            else
            {
                param.RequestTransType = "GetATMTransactionByATMNo";
            }
            param.WSDL = "ESBDBDelimiter";

            try
            {
                ESBData data = EAI.RetrieveESBData(param);
                if (data.Result != null && data.Result.Count > 0)
                {
                    int            counter = 0;
                    ATMTransaction record  = null;
                    foreach (var entry in data.Result)
                    {
                        record = new ATMTransaction();

                        //DateTime? transactionDate = Formatter.ParseExact(entry["tran_dat"], "yyyy-MM-dd HH:mm:ss");
                        //string a = Formatter.ToStringExact(DateTime.ParseExact(entry["tran_dat"], "dd/MM/yyyy hh:mm:ss", null), "dd/MM hh:mm");

                        //DateTime dt = DateTime.ParseExact(entry["tran_dat"], "dd MM yyyy hh:mm:ss", null);
                        //string s = dt.ToString("dd-MM hh:mm");

                        double amountValue = 0;
                        double.TryParse(entry["amt_1"], out amountValue);
                        amountValue = amountValue / 100;

                        string rateEsb   = entry["crncy_conv_rate"];
                        double rateValue = 0;
                        if (!string.IsNullOrEmpty(rateEsb))
                        {
                            double nValue = 0;
                            double.TryParse(rateEsb.Substring(0, 1), out nValue);
                            double.TryParse(rateEsb.Remove(0, 1), out rateValue);
                            rateValue = rateValue / Math.Pow(10, nValue);
                        }

                        double conversionAmount = 0;
                        double.TryParse(entry["crncy_conv_amt"], out conversionAmount);
                        conversionAmount = conversionAmount / 100;
                        double transactionAmount = 0;
                        double.TryParse(entry["amt_2"], out transactionAmount);
                        transactionAmount = transactionAmount / 100;

                        string currency = entry["from_crncy_cde"];

                        counter++;
                        record.Number          = counter.ToString();
                        record.TransactionCode = entry["tran_cde"];
                        //record.TransactionDate = transactionDate.ToString();
                        record.TransactionDate        = entry["tran_dat"];
                        record.Amount1                = amountValue.ToString();
                        record.ResponseCode           = entry["respcode"];
                        record.ResponseDescription    = entry["respdesc"];
                        record.TransactionDescription = entry["trandesc"];
                        //record.Currency = entry["from_crncy_cde"];
                        record.Currency         = entry["orig_crncy_cde"];
                        record.Terminal         = entry["term_id"];
                        record.Rate             = rateValue.ToString();
                        record.ConversionAmount = GetConversionAmount(entry, conversionAmount);
                        record.Amount2          = GetConversionAmount(entry, transactionAmount);
                        record.FromAccount      = entry["from_acct_acct_num"];
                        record.ToAccount        = entry["to_acct_acct_num"];
                        record.PayeeCode        = entry["payee_code"];
                        record.PayeeNumber      = entry["bill_acct_num"];
                        record.SequenceNumber   = entry["seq_num"];

                        ResultList.Add(record);
                    }
                }
            }
            catch (Exception e)
            {
            }
            return(ResultList);
        }
Exemplo n.º 18
0
        private void InsertUpdateCustAddress(Customer customer, StringDictionary esbCust)
        {
            CRMDb db = new CRMDb();

            List <CustomerAddress>             addressList = new List <CustomerAddress>();
            List <KeyValuePair <int, string> > results     = new List <KeyValuePair <int, string> >();

            /*  [CustomerIndicator] can either be 0, 1 or 2.
             *  0: The customer has Credit Card & Deposit
             *            ALL address types will be returned
             *  1: The customer has Deposit Only
             *            Home and Mailing Address will be returned
             *  2: The customer has Credit Card Only
             *            Billing, Office and Other Address will be returned
             */

            bool isCorporate = (customer.GenderCode == 200000);

            switch (esbCust["customerIndicator"])
            {
            case "0":                                                                                               // The customer has Credit Card and Deposit
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeHome), esbCust));    // ContactAddressType = Home
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOffice), esbCust));  // ContactAddressType = Office
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeMailing), esbCust)); // ContactAddressType = Mailing
                if (!isCorporate)
                {
                    Params paramList = new Params()
                    {
                        Parameter = new Dictionary <string, string>()
                    };
                    paramList.RequestTransType = "GetCreditCardAddressesByCisNo";
                    paramList.Parameter.Add("cisNo", customer.CISNumber);
                    paramList.WSDL = "CCAddressDetail";

                    ESBData addresses = new ESBData()
                    {
                        Result = new List <StringDictionary>()
                    };
                    addresses = EAI.RetrieveESBData(paramList);
                    foreach (StringDictionary address in addresses.Result)
                    {
                        addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeBilling), address));   // ContactAddressType = Billing
                        addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOther), address));     // ContactAddressType = Other
                    }
                }
                else
                {
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeBilling), esbCust));   // ContactAddressType = Billing
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOther), esbCust));     // ContactAddressType = Other
                }
                break;

            case "1":                                                                                               // The customer has Deposit Card only
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOffice), esbCust));  // ContactAddressType = Office
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeHome), esbCust));    // ContactAddressType = Home
                addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeMailing), esbCust)); // ContactAddressType = Mailing
                break;

            case "2":     // The customer has Credit Card only
                // Change for fixing the customer search defect which has a cis number "00000000000".
                if (esbCust["custno"] == "00000000000" || isCorporate)
                {
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeHome), esbCust));     // ContactAddressType = Home
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOffice), esbCust));   // ContactAddressType = Office
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeMailing), esbCust));  // ContactAddressType = Mailing
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeBilling), esbCust));  // ContactAddressType = Billing
                    addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOther), esbCust));    // ContactAddressType = Other
                }
                else
                {
                    Params paramList = new Params()
                    {
                        Parameter = new Dictionary <string, string>()
                    };
                    paramList.RequestTransType = "GetCreditCardAddressesByCisNo";
                    paramList.Parameter.Add("cisNo", customer.CISNumber);
                    paramList.WSDL = "CCAddressDetail";

                    ESBData addresses = EAI.RetrieveESBData(paramList);
                    foreach (StringDictionary address in addresses.Result)
                    {
                        addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeBilling), address));   // ContactAddressType = Billing
                        addressList.Add(RetrieveAddress(int.Parse(Resources.Customer.ContactAddressTypeOther), address));     // ContactAddressType = Other
                    }
                }

                break;
            }

            // Push CustAddress to DB
            // ----------------------

            KeyValuePair <int, string> result = new KeyValuePair <int, string>();

            result = db.CustomerAddress_Delete(customer);
            if (result.Key == 0) // deleteCustAddress successful, then insertCustAddresses
            {
                KeyValuePair <int, string> res = new KeyValuePair <int, string>();

                int  i        = 3;
                int  addrType = (customer.CISNumber.StartsWith("C_") ? 200000 : 1);
                bool insert   = false;

                foreach (CustomerAddress address in addressList)
                {
                    if (!(address.Line1 == "" && address.Line2 == "" && address.Line3 == "" && address.City == "" && address.Country == "" && address.StateOrProvince == "" && address.PostalCode == ""))
                    {
                        address.CustomerAddressId    = Guid.NewGuid();
                        address.ParentId             = customer.CustomerID;
                        address.AddressNumber        = i;
                        address.CreatedBy            = customer.ModifiedBy;
                        address.ModifiedBy           = customer.ModifiedBy;
                        address.CreditCardCustomerNo = customer.CreditCardCustomerNo;
                        res = db.CustomerAddress_Insert(address);
                        i  += 1;

                        if ((address.AddressTypeCode == addrType) && !insert)
                        {
                            address.CustomerAddressId = Guid.NewGuid();
                            address.AddressNumber     = 1;
                            res    = db.CustomerAddress_Insert(address);
                            insert = true;
                        }
                    }
                }
                results.Add(res);
            }
        }
Exemplo n.º 19
0
        public JsonResult EmailDetail()
        {
            string getType   = Request["_type"];
            string getVal    = Request["_val"];
            string getFilter = Request["_filter"];

            Params paramList = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };
            ESBData esbData = new ESBData()
            {
                Result = new List <StringDictionary>()
            };

            Object[]     data         = new Object[1];
            JSONResponse jsonResponse = new JSONResponse();

            switch (getType)
            {
            case "inboxFindByPKID":
                paramList.RequestTransType = "InqSendedEmailDetailByRefNo";
                paramList.Parameter.Add("RefNo", getVal);
                paramList.WSDL = "ESBDBDelimiter";

                List <EmailInboxByRefNo> listEmailInboxsByPKID = new List <EmailInboxByRefNo>();

                esbData = EAI.RetrieveESBData(paramList);

                if (esbData != null && esbData.Result.Count != 0)
                {
                    foreach (StringDictionary kvp in esbData.Result)
                    {
                        EmailInboxByRefNo model = new EmailInboxByRefNo();
                        if (kvp.ContainsKey("refNo"))
                        {
                            model.Id          = kvp[EmailInboxByRefNoMapping.refNo];
                            model.NoReferensi = kvp[EmailInboxByRefNoMapping.refNo];
                        }
                        else
                        {
                            model.Id          = getVal;
                            model.NoReferensi = getVal;
                        }
                        if (kvp.ContainsKey("agentFlag"))
                        {
                            model.StatusTerakhir = kvp[EmailInboxByRefNoMapping.agentFlag];
                        }
                        if (kvp.ContainsKey("agentId"))
                        {
                            model.AgentId = kvp[EmailInboxByRefNoMapping.agentId];
                        }
                        model.Pengirim = kvp[EmailInboxByRefNoMapping.custId];
                        model.Subject  = kvp[EmailInboxByRefNoMapping.subject];
                        model.Tanggal  = kvp[EmailInboxByRefNoMapping.createdDate];

                        string      dateString, format;
                        DateTime    result;
                        CultureInfo provider = CultureInfo.InvariantCulture;

                        // Parse date-only value with invariant culture.
                        dateString = model.Tanggal;
                        format     = "M/d/yyyy h:mm:ss tt"; // h for 12 hour format, HH dor 24 hour format
                        try
                        {
                            result = DateTime.ParseExact(dateString, format, provider);
                            Console.WriteLine("{0} converts to {1}.", dateString, result.ToString());
                            model.Tanggal = result.ToString("dd/MM/yyyy HH:mm:ss");
                        }
                        catch (FormatException)
                        {
                            Console.WriteLine("{0} is not in the correct format.", dateString);
                        }
                        model.Content = kvp[EmailInboxByRefNoMapping.content];
                        listEmailInboxsByPKID.Add(model);
                    }
                }
                var temp = listEmailInboxsByPKID
                           .Select(x => new
                {
                    Id             = x.Id,
                    NoReferensi    = x.NoReferensi,
                    Pengirim       = x.Pengirim,
                    Subject        = x.Subject,
                    Tanggal        = x.Tanggal,
                    StatusTerakhir = x.StatusTerakhir,
                    Content        = x.Content,
                    AgentId        = x.AgentId,
                    Tujuan         = Session["DomainUserName"].ToString(),
                    TujuanFullName = Session["Fullname"].ToString()
                });
                data = temp.ToArray();
                jsonResponse.Data = data;
                break;
            }
            return(Json(jsonResponse));
        }
Exemplo n.º 20
0
        public ActionResult EmailSendDraft()
        {
            string getType          = Request["_type"];
            string getVal           = Request["_val"];
            string getAgentID       = Request["_pengirim"];
            string getCustID        = Request["_tujuan"];
            string getSubject       = Request["_subject"];
            string getContent       = Request["_isiBerita"];
            string getNoReferensi   = Request["_noReferensi"];
            string getUserLoc       = "";
            string getUserFlag      = "";
            string getAgentSpvLoc   = "WTAP";
            string getAgentFlag     = "READ";
            string getSupervisorID  = "";
            string getDateTimeAgent = DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss");
            string getDateTimeUser  = "";

            ViewBag.Type = "sendEmail";
            Params paramList = new Params()
            {
                Parameter = new Dictionary <string, string>()
            };
            ESBData esbData = new ESBData()
            {
                Result = new List <StringDictionary>()
            };

            Object[]     data         = new Object[1];
            JSONResponse jsonResponse = new JSONResponse();

            bool checkSpv = false;

            switch (getType)
            {
            case "kirimEmail":
                checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailSend", "SPV");
                break;

            case "inbox":
                checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailInbox", "SPV");
                break;

            case "outbox":
                checkSpv = RoleNPrivilege.checkEntityButtonByRoleID(new Guid(Session["RoleID"].ToString()), "EmailOutbox", "SPV");
                break;
            }

            switch (checkSpv)
            {
            case true:
                paramList.RequestTransType = "SendDraftEmail";
                paramList.Parameter.Add("UserLoc", getUserLoc);
                paramList.Parameter.Add("UserFlag", getUserFlag);
                paramList.Parameter.Add("AgentSpvLoc", getAgentSpvLoc);
                paramList.Parameter.Add("SupervisorID", getSupervisorID);
                paramList.Parameter.Add("Content", getContent);
                paramList.Parameter.Add("DateTimeAgent", getDateTimeAgent);
                paramList.Parameter.Add("PK_ID", getNoReferensi);
                paramList.WSDL = "ESBDBDelimiter";

                esbData = EAI.RetrieveESBData(paramList);

                if (esbData != null && esbData.Result.Count != 0)
                {
                    foreach (StringDictionary kvp in esbData.Result)
                    {
                        if (kvp.ContainsKey("result"))
                        {
                            jsonResponse.Value = new
                            {
                                Message = Resources.Email.EmailSendSuccess
                            };
                            jsonResponse.Response = kvp["result"];
                        }
                    }
                }
                break;

            case false:
                paramList.RequestTransType = "SendDraftEmail";
                paramList.Parameter.Add("UserLoc", getUserLoc);
                paramList.Parameter.Add("UserFlag", getUserFlag);
                paramList.Parameter.Add("AgentSpvLoc", getAgentSpvLoc);
                paramList.Parameter.Add("SupervisorID", getSupervisorID);
                paramList.Parameter.Add("Content", getContent);
                paramList.Parameter.Add("DateTimeAgent", getDateTimeAgent);
                paramList.Parameter.Add("PK_ID", getNoReferensi);
                paramList.WSDL = "ESBDBDelimiter";

                esbData = EAI.RetrieveESBData(paramList);

                if (esbData != null && esbData.Result.Count != 0)
                {
                    foreach (StringDictionary kvp in esbData.Result)
                    {
                        if (kvp.ContainsKey("result"))
                        {
                            jsonResponse.Value = new
                            {
                                Message = Resources.Email.EmailSendSuccess
                            };
                            jsonResponse.Response = kvp["result"];
                        }
                    }
                }
                break;
            }
            return(Json(jsonResponse));
        }