public PaymentGEPPaymentProcessResultT PaymentExecuteOrder(
			PaymentOrderMultiParamT orderParam
			, PaymentOrderMultiParamEtcT orderParamEtc
			, PaymentInfoCheckT payMethodtInfo
			, List<PaymentDataOrderInfoT> paymentDataOrderInfoList
			, List<PaymentDataCostBasisInfoT> paymentDataCostBasisInfoList
			, List<PaymentOrderItemCostInfoT> paymentOrderItemCostInfoList)
        {
            PaymentGEPPaymentProcessResultT orderResult = new PaymentGEPPaymentProcessResultT();
            PaymentProcessQueryBiz biz = new PaymentProcessQueryBiz();

            orderResult.Result = new GEPBaseResultT();

            string acntNo = string.Empty;
            string cashpayWay = "M";
            int affectedRowCount = 0;

            #region 미리 처리할 것들

            #endregion

            #region 주문 중 수량 입력

            try
            {
                biz.UpdatePaymentOrderCountToOrderBufSell(orderParam.PackNo);
            }
            catch
            {
                throw new PaymentProcessBizException(-742, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 결제 수단 처리

            // 현금 계좌 생성
            if (orderParam.AcntType.Equals("A3", StringComparison.InvariantCultureIgnoreCase))
            {
                if (orderParam.CardCash.Equals("CASH", StringComparison.InvariantCultureIgnoreCase))
                {
                    // 일반계좌 생성
                    if (string.IsNullOrEmpty(orderParam.Vaccount) || orderParam.Vaccount.Length < 3)
                    {
                        cashpayWay = "M";

                        if (orderParam.MemberWay.Equals("NON", StringComparison.InvariantCultureIgnoreCase))
                        {
                            acntNo = "300792725";
                        }
                        else
                        {
                            PaymentCashAccountInfoT customerCashAccountInfo = biz.GetCustomerCashAccountInfo(orderParam.CustNo, cashpayWay);

                            acntNo = customerCashAccountInfo != null ? customerCashAccountInfo.AcntNo : string.Empty;
                        }
                    }
                    else // 가상계좌 생성
                    {
                        cashpayWay = "V";

                        // 잘못된 가상계좌 튕겨내기
                        if (!biz.GetExistAccountMCash(orderParam.CustNo, orderParam.VacntNo, cashpayWay, orderParam.Vaccount).IsExist)
                        {
                            throw new PaymentProcessBizException(-334, "가상계좌 정보에 이상이 있습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                        }

                        acntNo = orderParam.Vaccount;

                    }

                    if (string.IsNullOrEmpty(acntNo))
                    {
                        throw new PaymentProcessBizException(-321, "온라인 입금을 위한 계좌 정보를 찾지 못했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                    }
                }
            }
            else if (orderParam.AcntType.Equals("I1", StringComparison.InvariantCultureIgnoreCase)) // Paypal 계좌 생성
            {
                if (orderParam.CardCash.Equals("GBANK_PAYPAL", StringComparison.InvariantCultureIgnoreCase))
                {
                    cashpayWay = "P";

                    try
                    {
                        PaymentGlobalAccountInfoT customerGlobalAccountInfo = biz.GetCustomerGlobalAccountInfo(orderParam.CustNo, cashpayWay);
                        acntNo = customerGlobalAccountInfo != null ? customerGlobalAccountInfo.AcntNo : string.Empty;

                        if (string.IsNullOrEmpty(acntNo) || acntNo.Length < 3)
                        {
                            string result = biz.MakePersonalAccount(orderParam.CustNo, orderParam.AcntType, orderParam.Gbank.ToString()
                                , string.Empty, string.Empty, string.Empty, 0, string.Empty, string.Empty
                                , string.Empty, string.Empty, string.Empty, string.Empty, orderParam.CardCash
                                , string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, 0, null
                                , string.Empty, "Y", 0, string.Empty);

                            acntNo = result;
                        }
                    }
                    catch
                    {
                        throw new PaymentProcessBizException(-333, "외화입금 계좌 생성중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                    }

                    if (string.IsNullOrEmpty(acntNo))
                    {
                        throw new PaymentProcessBizException(-322, "온라인 입금을 위한 계좌 정보를 찾지 못했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                    }
                    else if (acntNo == "-1")
                    {
                        throw new PaymentProcessBizException(-333, "외화입금 계좌 생성중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                    }

                }
            }
            else if (orderParam.AcntType.Equals("A2", StringComparison.InvariantCultureIgnoreCase)
                || orderParam.AcntType.Equals("A7", StringComparison.InvariantCultureIgnoreCase)) // 카드 계좌 생성
            {
                cashpayWay = "M";

                try
                {
                    decimal totalAcntMoney = paymentDataOrderInfoList.Sum(x => (decimal)(x.OrderPrice * x.OrderCnt) + x.SelItemPrice + x.DeliveryFee - x.CostPrice);

                    string result = biz.MakePersonalAccount(orderParam.CustNo, orderParam.AcntType, payMethodtInfo.MasterCard
                        , orderParam.CardNumber, orderParam.CardYear, orderParam.CardMonth, orderParam.Installmonth, orderParam.CardPwd, orderParam.SocialNo2
                        , orderParam.KVPCardCode, payMethodtInfo.SessionKey, payMethodtInfo.EncData, payMethodtInfo.AppType, string.Empty
                        , string.Empty, string.Empty, string.Empty, string.Empty, orderParam.Eci, 0, null
                        , orderParamEtc.OrderJaehuID, orderParamEtc.DirectYN, totalAcntMoney, orderParam.HalbuType);

                    acntNo = result;
                }
                catch
                {
                    throw new PaymentProcessBizException(-338, "카드 계좌 처리작업중 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

                if (string.IsNullOrEmpty(acntNo) || acntNo == "-1")
                {
                    throw new PaymentProcessBizException(-328, "카드 계좌 생성중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }
            else
            {
                throw new PaymentProcessBizException(-376, "결제 정보가 잘못 되었습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            // PayPal Express CheckOut
            if (orderParam.CardCash.Equals("GBANK_PAYPAL", StringComparison.InvariantCultureIgnoreCase)
                && orderParam.PaypalToken.Trim().Length != 0)
            {
                if (biz.GetExistPaypalPaymentInfo(orderParam.PaypalToken).IsExist)
                {
                    throw new PaymentProcessBizException(-727, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

                try
                {

                    PaymentPaypalPaymentInfoT paypalPaymentInfo = biz.GetPaypalPaymentInfo(orderParam.PaypalToken);

                    biz.UpdatePaypalPaymentInfo(orderParam.PackNo, orderParam.PaypalToken, paypalPaymentInfo == null || string.IsNullOrEmpty(paypalPaymentInfo.CustNo) ? orderParam.CustNo : string.Empty);
                }
                catch
                {
                    throw new PaymentProcessBizException(-728, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            // 카드 정보 기록
            if (orderParam.AcntType.Equals("A2", StringComparison.InvariantCultureIgnoreCase)
               || orderParam.AcntType.Equals("A7", StringComparison.InvariantCultureIgnoreCase))
            {
                try
                {
                    biz.InsertCardInfo(orderParam.PackNo, payMethodtInfo.SessionKey, payMethodtInfo.EncData, payMethodtInfo.AppType
                        , orderParam.Installmonth, orderParam.CardPwd, orderParam.RemoteAddr, orderParam.Eci
                        , (string.IsNullOrEmpty(orderParam.PaySaveCardYN) ? "N" : orderParam.PaySaveCardYN)
                        , orderParam.SocialNo2, orderParam.HalbuType, orderParam.KVPCardCode, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-330, "주문카드 정보 기록중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 경품권 서비스 관련

            if (orderParam.MemberWay.Equals("MEM", StringComparison.InvariantCultureIgnoreCase)
                && !orderParam.OrderWayKind.Equals("BAR", StringComparison.InvariantCultureIgnoreCase))
            {
                try
                {
                    int insertedRowCount = biz.InsertSticketAccHistory(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID);

                    if (insertedRowCount > 0)
                    {
                        if (biz.GetExistSticketAccount(orderParam.CustNo).IsExist)
                        {
                            biz.UpdateStickerAccount(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID, orderParam.OrderDateTime);
                        }
                        else
                        {
                            biz.InsertStickerAccount(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID);
                        }
                    }
                }
                catch
                {
                    throw new PaymentProcessBizException(-417, "경품권 서비스 관련 오류 발생.");
                }
            }

            #endregion

            #region 세금계산서 및 현금영수증 요청 처리

            if (orderParam.TaxRegNo.Length >= 9)
            {
                string cardKind = (orderParam.IsCorpCard.Equals("Y", StringComparison.InvariantCultureIgnoreCase) ? "Y" : (orderParam.IsCorpCard.Equals("N", StringComparison.InvariantCultureIgnoreCase) ? "N" : string.Empty));

                try
                {
                    biz.InsertRequestTaxCheck(orderParam.PackNo, orderParam.CustNo, orderParam.TaxRegNo
                        , orderParam.TaxCompanyNm, orderParam.TaxBoss, orderParam.TaxAddress, orderParam.TaxRcvAddress
                        , orderParam.TaxZipCode, orderParam.TaxCategory, orderParam.TaxKind, cardKind
                        , orderParam.TaxEmail, orderParam.TaxPhone, orderParam.TaxMemo
                        , orderParam.TaxChargeName, orderParam.TaxChargeName, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-808, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다");
                }

                if (orderParam.CashRegNo.Length >= 9)
                {
                    if (paymentDataOrderInfoList
                        .Where(x => x.TaxIssueYn.Equals("N", StringComparison.InvariantCultureIgnoreCase) && x.CashIssueYn.Equals("Y", StringComparison.InvariantCultureIgnoreCase))
                        .Sum(x => (decimal)(x.OrderPrice * x.OrderCnt) + x.SelItemPrice + x.DeliveryFee - x.CostPrice) >= 10)
                    {
                        try
                        {
                            List<PaymentDataOrderInfoT> cashReceiptDataOrderList = paymentDataOrderInfoList.Where(x => x.TaxIssueYn.Equals("N", StringComparison.InvariantCultureIgnoreCase) && x.CashIssueYn.Equals("Y", StringComparison.InvariantCultureIgnoreCase)).ToList<PaymentDataOrderInfoT>();

                            foreach (PaymentDataOrderInfoT item in cashReceiptDataOrderList)
                            {
                                biz.InsertCashReceipt(orderParam.CashUseType, orderParam.CashRegNo, orderParam.CashName
                                    , item.OrderNo, item.ItemNo, orderParam.CashPhone, orderParam.CashEmail
                                    , (item.SelItemPrice + item.DeliveryFee - item.CostPrice), orderParam.CustNo
                                    , "Y", orderParam.IdFlag);
                            }
                        }
                        catch
                        {
                            throw new PaymentProcessBizException(-809, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다");
                        }
                    }
                }
            }
            else
            {
                if (orderParam.CashRegNo.Length >= 9)
                {
                    if (paymentDataOrderInfoList
                        .Where(x => x.CashIssueYn.Equals("Y", StringComparison.InvariantCultureIgnoreCase))
                        .Sum(x => (decimal)(x.OrderPrice * x.OrderCnt) + x.SelItemPrice + x.DeliveryFee - x.CostPrice) >= 10)
                    {
                        try
                        {
                            List<PaymentDataOrderInfoT> cashReceiptDataOrderList = paymentDataOrderInfoList.Where(x => x.CashIssueYn.Equals("Y", StringComparison.InvariantCultureIgnoreCase)).ToList<PaymentDataOrderInfoT>();

                            foreach (PaymentDataOrderInfoT item in cashReceiptDataOrderList)
                            {
                                biz.InsertCashReceipt(orderParam.CashUseType, orderParam.CashRegNo, orderParam.CashName
                                    , item.OrderNo, item.ItemNo, orderParam.CashPhone, orderParam.CashEmail
                                    , (item.SelItemPrice + item.DeliveryFee - item.CostPrice), orderParam.CustNo
                                    , "Y", orderParam.IdFlag);
                            }
                        }
                        catch
                        {
                            throw new PaymentProcessBizException(-810, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다");
                        }
                    }
                }
            }

            #endregion

            #region 공급원가 입력

            try
            {
                biz.InsertPaymentDsorderSttlData(paymentOrderItemCostInfoList);
            }
            catch
            {
                throw new PaymentProcessBizException(-741, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 할인정보 입력

            if (paymentDataCostBasisInfoList.Count > 0)
            {
                try
                {
                    biz.InsertDsorderCostbasisInfo(orderParam.PackNo, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-113, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 현금성 도용 예외처리

            if (biz.GetExistCashTypeGoods(orderParam.PackNo).IsExist)
            {
                if (orderParam.AcntType.Equals("AM", StringComparison.InvariantCultureIgnoreCase) ||
                    orderParam.AcntType.Equals("A8", StringComparison.InvariantCultureIgnoreCase) ||
                    (orderParam.AcntType.Equals("A3", StringComparison.InvariantCultureIgnoreCase) &&
                    cashpayWay.Equals("V", StringComparison.InvariantCultureIgnoreCase)))
                {
                    throw new PaymentProcessBizException(-10, "결제가 불가능 합니다.");
                }
            }

            #endregion

            #region 사자 주문 입력

            // dsorderindex 테이블에 입력하기
            affectedRowCount = 0;
            try
            {
                affectedRowCount = biz.InsertDsorderIndex(orderParam.PackNo, orderParam.OrderDateTime);
            }
            catch
            {
                throw new PaymentProcessBizException(-708, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            if (affectedRowCount != orderParam.ItemCount)
            {
                throw new PaymentProcessBizException(-708, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            // dsorder 테이블에 입력하기
            affectedRowCount = 0;
            try
            {
                affectedRowCount = biz.InsertDsorder(orderParam.PackNo, orderParam.CustNo, orderParam.TaxRegNo
                    , acntNo, orderParam.ReceiverName, orderParam.ReceiverZipCode, orderParam.ReceiverAddr1, orderParam.ReceiverAddr2
                    , orderParam.AcntType, orderParam.ReceiverPhoneNo, orderParam.ReceiverHpNo, orderParam.BuyerEmail
                    , orderParam.Gbank, orderParam.DepositNm, orderParam.OnCreditYN, orderParam.Vaccount
                    , orderParam.FreeInterestNo, orderParam.HalbuType, orderParam.AddressNo, cashpayWay, orderParam.OrderDateTime);
            }
            catch
            {
                throw new PaymentProcessBizException(-709, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            if (affectedRowCount != orderParam.ItemCount)
            {
                throw new PaymentProcessBizException(-709, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            // dsorder_sub 테이블에 입력하기
            try
            {
                biz.InsertDsorderSub(orderParam.PackNo);
            }
            catch
            {
                throw new PaymentProcessBizException(-720, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 필수구성/선택옵션 정보 입력

            try
            {
                biz.InsertDsselorder(orderParam.BasketPID, orderParam.PackNo);
            }
            catch
            {
                throw new PaymentProcessBizException(-710, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 필수구성/선택옵션 가격 조작 방지 체크

            PaymentCurrentSelPriceInfoT currentSelPriceInfo = biz.GetCurrentSelPriceInfo(orderParam.PackNo);

            if (currentSelPriceInfo != null)
            {
                if (currentSelPriceInfo.SelItemPriceDb != currentSelPriceInfo.SelItemPriceIn)
                {
                    throw new PaymentProcessBizException(-807, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region G-Plus 카드 쿠폰 사용내용 기록

            if (paymentDataCostBasisInfoList.Any(x => x.BasisKind.Equals("PCP", StringComparison.InvariantCultureIgnoreCase)) && orderParam.PaymentCode.Equals("Po_HN_G", StringComparison.InvariantCultureIgnoreCase))
            {
                string useMonth;

                if (orderParam.OrderDateTime.Day < 5)
                {
                    useMonth = orderParam.OrderDateTime.AddMonths(-1).Year.ToString() + orderParam.OrderDateTime.AddMonths(-1).Month.ToString().PadLeft(2, '0');
                }
                else
                {
                    useMonth = orderParam.OrderDateTime.Year.ToString() + orderParam.OrderDateTime.Month.ToString().PadLeft(2, '0');
                }

                affectedRowCount = 0;
                int gplusCostBasisNo = 0;
            #if DEBUG || PAYMENT_DEBUG
                gplusCostBasisNo = 2238819;
            #else
                gplusCostBasisNo = 2238819;
            #endif
                try
                {
                    affectedRowCount = biz.InsertGlusUsedCouponInfo(orderParam.PackNo, orderParam.CustNo, orderParam.PaymentCode
                        , "SN", useMonth, gplusCostBasisNo, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-118, "배송비 할인쿠폰 적용 에러입니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

                if (affectedRowCount > 0)
                {
                    try
                    {
                        biz.UpdateUsedCouponSum(orderParam.CustNo, orderParam.LoginID, useMonth, affectedRowCount, orderParam.OrderDateTime);
                    }
                    catch
                    {
                        throw new PaymentProcessBizException(-119, "배송비 할인쿠폰 적용 에러입니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                    }
                }
            }

            #endregion

            #region 위약금 정보 입력

            if (paymentDataOrderInfoList.Any(x => x.PolicyNo != 0))
            {
                try
                {
                    biz.InsertChargeOffOrder(orderParam.PackNo, orderParam.CustNo, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-504, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 외화입금 정보 입력

            if (orderParam.CardCash.Equals("GBANK_PAYPAL", StringComparison.InvariantCultureIgnoreCase))
            {
                int gubunMethod;
                string paymentMthd;
                decimal gExchangeRate;

                if (orderParam.GbankGubun.Equals("citibank", StringComparison.InvariantCultureIgnoreCase))
                {
                    gubunMethod = 2000;
                    paymentMthd = "02";
                }
                else if (orderParam.GbankGubun.Equals("resonabank", StringComparison.InvariantCultureIgnoreCase))
                {
                    gubunMethod = 30000;
                    paymentMthd = "03";
                }
                else if (orderParam.GbankGubun.Equals("paypal_express", StringComparison.InvariantCultureIgnoreCase))
                {
                    gubunMethod = 110000;
                    paymentMthd = "01";
                }
                else
                {
                    gubunMethod = 10000;
                    paymentMthd = "01";
                }

                try
                {
                    gExchangeRate = biz.GetExchangeRate(paymentMthd, orderParam.OrderDateTime);
                    biz.InsertDsgbankorder(orderParam.PackNo, gubunMethod, paymentMthd, gExchangeRate, orderParam.ForeignMoney, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-335, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

            }

            #endregion

            #region 개인별 할인쿠폰 사용여부 변경

            if (paymentDataCostBasisInfoList.Any(x => x.BasisKind.Equals("PCP", StringComparison.InvariantCultureIgnoreCase)))
            {
                // 쿠폰 사용내역 업데이트
                try
                {
                    biz.UpdateDcouponDetail(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-114, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

                // 쿠폰 사용 히스토리 입력
                try
                {
                    biz.InsertOrderCouponHistory(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-115, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 복수구매 할인 정보 기록

            if (paymentDataOrderInfoList.Any(x => x.BundCondNo > 0))
            {
                try
                {
                    biz.InsertBundKeysProc(orderParam.PackNo, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-116, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 세트구매 할인 정보 기록

            if (paymentDataOrderInfoList.Any(x => x.SetCostNo > 0))
            {
                try
                {
                    biz.InsertDsSetCostOrder(orderParam.PackNo, orderParam.LoginID, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-129, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 묶음구매 할인 정보 기록

            if (paymentDataOrderInfoList.Any(x => x.PackCostNo > 0))
            {
                try
                {
                    biz.InsertDsSetCostOrder(orderParam.PackNo, orderParam.LoginID, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-133, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 결제에 따른 코드 추가

            if (!string.IsNullOrEmpty(orderParam.PaymentCode) && orderParam.PaymentCode.Length > 0)
            {
                try
                {
                    biz.UpdateDscontrPolicySttlCode(orderParam.PackNo, orderParam.PaymentCode);
                }
                catch
                {
                    throw new PaymentProcessBizException(-133, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 현금잔고 주문시 장바구니 번호 입력

            if (orderParam.AcntType.Equals("A3", StringComparison.InvariantCultureIgnoreCase)
                && orderParam.CardCash.Equals("CASH", StringComparison.InvariantCultureIgnoreCase)
                && orderParam.Gbank == 60000)
            {
                try
                {
                    biz.InsertBuySttlBalancePackNo(orderParam.PackNo);
                }
                catch
                {
                    throw new PaymentProcessBizException(-744, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 해외PG 한도 제한 관련 기록

            if (!string.IsNullOrEmpty(orderParam.SettleLimitKey) && orderParam.SettleLimitKey.Length > 12)
            {
                if (orderParam.AcntType.Equals("I1", StringComparison.InvariantCultureIgnoreCase))
                {
                    orderParam.AcntType = "I2";
                }

                decimal totalOrderPeice = paymentDataOrderInfoList.Sum(x => x.OrderPrice * (decimal)x.OrderCnt);
                try
                {
                    biz.InsertLimitOrderSettleLog(orderParam.PackNo, orderParam.CustNo, orderParam.LoginID
                        , orderParam.SettleLimitKey, totalOrderPeice, orderParam.AcntType, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-748, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 주문 유입경로 기록

            try
            {
                biz.InsertOrderFlowLog(orderParam.PackNo, orderParamEtc.PolicyOrderSrc, orderParam.PrimaryCheckValue, orderParam.OrderDateTime);
            }
            catch
            {
                throw new PaymentProcessBizException(-812, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 북캐시 적립 정책 기록

            if (biz.GetExistBookCashInfo(orderParam.PackNo).IsExist)
            {
                try
                {
                    biz.InsertDsOrderBookCash(orderParam.PackNo, orderParam.LoginID, orderParam.OrderDateTime);
                }
                catch
                {
                    throw new PaymentProcessBizException(-814, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }

                try
                {
                    PaymentBookCashPolicyT bookCashPolicy = biz.GetBookCashPolicy("A", orderParam.OrderDateTime);

                    if (bookCashPolicy != null)
                    {
                        if (bookCashPolicy.BcashPNo != 0 && bookCashPolicy.BasisMoney > 0)
                        {
                            biz.InsertDsOrderBookCashPack(orderParam.PackNo, orderParam.LoginID, bookCashPolicy.BcashPNo, bookCashPolicy.PHistNo, bookCashPolicy.BasisMoney, orderParam.OrderDateTime);
                        }
                    }
                }
                catch
                {
                    throw new PaymentProcessBizException(-815, "주문 접수중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
                }
            }

            #endregion

            #region 쇼핑지원금 차감 처리

            if (paymentDataCostBasisInfoList.Any(x => x.BasisKind.Equals("SSD", StringComparison.InvariantCultureIgnoreCase)))
            {
                decimal remainSSCash = biz.GetRemainShoppingSupportCash(orderParam.CustNo, orderParam.OrderDateTime);
                decimal deductSSCash = paymentDataCostBasisInfoList.Where(x => x.BasisKind.Equals("SSD", StringComparison.InvariantCultureIgnoreCase)).Sum(x => x.CostPrice);

                if (remainSSCash < deductSSCash || remainSSCash <= 0)
                {
                    throw new PaymentProcessBizException(-157, "쇼핑지원금이 부족합니다.");
                }

                // 주문건별로 쇼핑지원금 차감 처리
                try
                {
                    var costSSInfo = (from x in paymentDataCostBasisInfoList
                                      where x.BasisKind.Equals("SSD", StringComparison.InvariantCultureIgnoreCase)
                                      group x by new { x.PackNo, x.ItemNo, x.BuyOrderNo } into g
                                      select new { PackNo = g.Key.PackNo, ItemNo = g.Key.ItemNo, OrderNo = g.Key.BuyOrderNo, ShoppingSupportCash = g.Sum(p => p.CostPrice) }
                                        ).ToList();

                    List<PaymentCostShoppingSupportInfoT> costSSInfoList = new List<PaymentCostShoppingSupportInfoT>();
                    foreach (var item in costSSInfo)
                    {
                        costSSInfoList.Add(new PaymentCostShoppingSupportInfoT
                        {
                            PackNo = item.PackNo,
                            ItemNo = item.ItemNo,
                            OrderNo = item.OrderNo,
                            ShoppingSupportCash = item.ShoppingSupportCash
                        });
                    }

                    if (costSSInfoList != null && costSSInfoList.Count > 0)
                    {

                        if (costSSInfoList.Count == 1)
                        {
                            int retCode = 0;

                            try
                            {
                                retCode = biz.SetShoppingSupportCash(orderParam.CustNo, "D1", costSSInfoList[0].ShoppingSupportCash, costSSInfoList[0].PackNo, costSSInfoList[0].ItemNo
                                    , costSSInfoList[0].OrderNo, null, null, 0, orderParam.LoginID, 0, "N", 0);
                            }
                            catch
                            {
                                throw new PaymentProcessBizException(-155, "쇼핑지원금 처리에 문제가 발생했습니다.");
                            }

                            if (retCode != 0)
                            {
                                throw new PaymentProcessBizException(-155, "쇼핑지원금 처리에 문제가 발생했습니다.");
                            }
                        }
                        else
                        {
                            try
                            {
                                biz.SetShoppingSupportCash(costSSInfoList, orderParam.CustNo, orderParam.LoginID, "D1");
                            }
                            catch (PaymentProcessBizException pEx)
                            {
                                throw pEx;
                            }
                            catch
                            {
                                throw new PaymentProcessBizException(-156, "쇼핑지원금 처리에 문제가 발생했습니다.");
                            }
                        }
                    }
                }
                catch (PaymentProcessBizException pEx)
                {
                    throw pEx;
                }
                catch
                {
                    throw new PaymentProcessBizException(-817, "쇼핑지원금 회원권 처리에 문제가 발생하였습니다. 다시 주문해 주시기 바랍니다.");
                }

            }

            #endregion

            #region 주문 유입 채널 정보 기록

            try
            {
                //string siteCode = string.Empty;
                string siteCode = "P";

                switch (orderParam.PrimaryCheckValue.ToUpper())
                {
                    case "ENG":
                        siteCode = "E";
                        break;
                    case "BRA":
                        siteCode = "B";
                        break;
                    case "SOH":
                        siteCode = "S";
                        break;
                    case "GIR":
                        siteCode = "G";
                        break;
                    case "GEP":
                        siteCode = "P";
                        break;
                }

                biz.InsertDsOrderChannelInfo(paymentDataOrderInfoList, siteCode, orderParamEtc.OrderJaehuID);
            }
            catch
            {
                throw new PaymentProcessBizException(-760, "채널 정보 기록 중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region 외부 주문 번호 저장

            try
            {
                biz.InsertOutContrList(orderParam.PackNo);
            }
            catch
            {
                throw new PaymentProcessBizException(-764, "외부 주문 정보 기록 중에 문제가 발생했습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            #endregion

            #region GEP의 통합주문 목록에 주문 정보 Update

            #if (!PAYMENT_DEBUG && !PAYMENT_RELEASE)
            try
            {
                List<PaymentGepOrderUpdateInfoT> gepOrderUpdateInfoList = new List<PaymentGepOrderUpdateInfoT>();

                foreach (PaymentDataOrderInfoT item in paymentDataOrderInfoList)
                {
                    gepOrderUpdateInfoList.Add(new PaymentGepOrderUpdateInfoT
                    {
                        GepOrderNo = item.GepOrderNo,
                        ItemNo = item.ItemNo,
                        OrderNo = (long)item.OrderNo,
                        PackNo = item.PackNo
                    });
                }

                new PaymentProcessQueryBiz().UpdateGepOrderList(gepOrderUpdateInfoList, orderParam.OrderDateTime);
            }
            catch (PaymentProcessBizException pEx)
            {
                throw pEx;
            }
            catch
            {
                throw new PaymentProcessBizException(-1104, "GEP 주문 정보 기록 중 오류가 발생하였습니다");
            }
            #endif
            #endregion

            return orderResult;
        }
Example #2
0
        /// <summary>
        /// 주문
        /// </summary>
        /// <param name="reqOrderParam"></param>
        /// <returns></returns>
        public PaymentGEPPaymentProcessResultT GEPOrderDomesticMulti(PaymentOrderMultiParamT reqOrderParam)
        {
            PaymentGEPPaymentProcessResultT orderResult = new PaymentGEPPaymentProcessResultT();
            List<PaymentGEPItemInfoT> paymentGEPItemInfoList;

            orderResult.Result = new GEPBaseResultT();

            #region 주문에 필요한 상품 정보 List 생성

            try
            {
                paymentGEPItemInfoList = ConvertOrderParam2ItemInfo(reqOrderParam);
                this._paymentGEPItemInfoList = paymentGEPItemInfoList;
            }
            catch (ArgumentException argumentEx)
            {
                throw new PaymentProcessBizException(Util.GetSafeInt(argumentEx.ParamName, -900), argumentEx.Message);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            #region CBT 통합 주문 주문가능 여부 확인

            #if (!PAYMENT_DEBUG && !PAYMENT_RELEASE)

            // 주문 가능여부 체크
            if (!new PaymentProcessQueryBiz().IsGEPOrderOrderable(paymentGEPItemInfoList.Select(c => Util.GetSafeLong(c.OutOrderNo)).ToList()))
            {
                throw new PaymentProcessBizException(-1109, "주문 할 수 없는 GEP 주문 건이 있습니다.");
            }
            #endif
            #endregion

            //int count = paymentBiz.InsertGEPPaymentItemInfo(paymentGEPItemInfoList);

            #endregion

            #region 주문실행

            try
            {
                this._orderParam = reqOrderParam;

                #region 주문 실행 시간

                this._orderParam.OrderDateTime = this.GetOrderDateTime();

                #endregion

                #region 파라메터 Validate

                PaymentValidateParameter();

                #endregion

                #region 주문 실행 준비 - 주문건별 Validation 및 주문정보 생성

                PaymentPrepare();

                #endregion

                #region 주문에 필요한 상품 정보 입력

                // 할인 정보
                PaymentInsertDataCostBasis(this._paymentDataCostBasisInfoList);

                // 상품 정보
                PaymentInsertDataOrder(this._paymentDataOrderInfoList);

                #endregion

                #region 총 상품 갯수

                this._orderParam.ItemCount = this._paymentDataOrderInfoList.Count;

                #endregion

                #region 기타정보 입력

                this._orderParamEtc.PolicyOrderSrc = "DM";

                #endregion

                #region 주문

                orderResult = PaymentExecuteOrder(this._orderParam
                    , this._orderParamEtc
                    , this._paymenPayMethodtInfo
                    , this._paymentDataOrderInfoList
                    , this._paymentDataCostBasisInfoList
                    , this._paymentOrderItemCostInfoList);

                // 주문 실행 시간 넣어준다.
                orderResult.OrderDateTime = this._orderParam.OrderDateTime;

                #endregion
            }
            catch (PaymentProcessBizException pEx)
            {
                throw pEx;
            }
            catch (Exception ex)
            {
                throw new PaymentProcessBizException(-1180, ex.Message);
            }

            #endregion

            return orderResult;
        }
Example #3
0
        /// <summary>
        /// GEP 주문
        /// </summary>
        /// <param name="paymentRequestInfo"></param>
        /// <returns></returns>
        public PaymentResultT Payment(PaymentRequestInfoT paymentRequestInfo)
        {
            #region 내부 변수

            PaymentRequestInfoT requestInfo = paymentRequestInfo;
            PaymentRequestInfoT orgRequestInfo = paymentRequestInfo;

            PaymentBiz paymentBiz = new PaymentBiz();

            PaymentResultT paymentResult = new PaymentResultT();
            paymentResult.Result = new GEPBaseResultT();

            //string oType = "N";
            int packNo = 0;

            #endregion

            #region 주문 파라메터 체크

            try
            {
                ValidateRequestInfo(paymentRequestInfo);
            }
            catch
            {
                throw new PaymentProcessBizException(-1101, "주문 정보가 올바르지 않습니다. 확인후 다시 주문해 주시기 바랍니다.");
            }

            #endregion

            #region 파라메터 초기화

            try
            {
                requestInfo = InitPaymentRequestInfo(requestInfo);
            }
            catch (PaymentProcessBizException pEx)
            {
                new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT");
                throw pEx;
            }
            catch (Exception ex)
            {
                throw new PaymentProcessBizException(-1170, ex.Message);
                //throw new PaymentProcessBizException(-1170, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다.");
            }

            #endregion

            #region Policy 입력

            try
            {
                PaymentOrderItemT paymentOrderItem = new PaymentPolicyInfo().SetPaymentOrderItem(orgRequestInfo, requestInfo);

                requestInfo.OrderNo = paymentOrderItem.OrderNo;
                packNo = paymentOrderItem.PolicyInfoList[0].PackNo;
            }
            catch (PaymentProcessBizException pEx)
            {
                new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT");
                throw pEx;
            }
            catch
            {
                throw new PaymentProcessBizException(-1171, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다");
            }

            #endregion

            #region 주문!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

            PaymentGEPPaymentProcessResultT paymentProcessResult = new PaymentGEPPaymentProcessResultT();
            try
            {
                PaymentOrderMultiParamT orderParam = PaymentProcessHelper.ConvertRequestInfo2OrderParam(requestInfo);

                // 추가 내용
                orderParam.PackNo = packNo;

                paymentProcessResult = new PaymentProcessQuery().GEPOrderDomesticMulti(orderParam);

                paymentResult.OrderParam = orderParam;

                // convert : 여기까지가 line 2194

                if (paymentProcessResult.Result.RetCode != 0)
                {
                    paymentResult.Result = paymentProcessResult.Result;

                    return paymentResult;
                }

                // fix : 아래는 임시임
                paymentResult.OrderResultList.AddRange(paymentProcessResult.OrderResultList);
                // 임시 끝
            }
            catch (PaymentProcessBizException pEx)
            {
                new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT");
                throw pEx;
            }
            catch
            {
                throw new PaymentProcessBizException(-1172, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다");
            }
            #endregion

            #region 주문 후 뒷처리

            // fix : [skip] 프로모션 상품 처리
            // convert : 여기까지가 line 2273

            try
            {
                PaymentProcessFollowUp(paymentProcessResult, requestInfo);
            }
            catch (PaymentProcessBizException pEx)
            {
                new PaymentErrorWriter().SendPaymentError(paymentRequestInfo, PaymentConstant.CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, pEx.ErrorCode, pEx.Message, "NT");
                throw pEx;
            }
            catch (Exception ex)
            {
                throw new PaymentProcessBizException(-1173, ex.Message);
                //throw new PaymentProcessBizException(-1173, "접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다");
            }

            #endregion

            //////////////////////////////
            paymentResult.PaymentRequestInfo = requestInfo;

            return paymentResult;
        }
Example #4
0
        /// <summary>
        /// 주문 실행
        /// </summary>
        /// <param name="orderParam"></param>
        /// <param name="orderParamEtc"></param>
        /// <param name="paymenPayMethodtInfo"></param>
        /// <param name="paymentDataOrderInfoList"></param>
        /// <param name="paymentDataCostBasisInfoList"></param>
        /// <param name="paymentOrderItemCostInfoList"></param>
        /// <returns></returns>
        //private List<PaymentGEPOrderMultiResultT> PaymentStartOrder()
        private PaymentGEPPaymentProcessResultT PaymentExecuteOrder(PaymentOrderMultiParamT orderParam
			, PaymentOrderMultiParamEtcT orderParamEtc
			, PaymentInfoCheckT paymenPayMethodtInfo
			, List<PaymentDataOrderInfoT> paymentDataOrderInfoList
			, List<PaymentDataCostBasisInfoT> paymentDataCostBasisInfoList
			, List<PaymentOrderItemCostInfoT> paymentOrderItemCostInfoList)
        {
            PaymentGEPPaymentProcessResultT orderResult = new PaymentGEPPaymentProcessResultT();

            PaymentBiz paymentBiz = new PaymentBiz();
            PaymentProcessQueryBiz paymentProcessQueryBiz = new PaymentProcessQueryBiz();

            orderResult.Result = new GEPBaseResultT();

            #region 주문

            #region 주문 실행

            PaymentGEPPaymentProcessResultT paymentExecuteOrderResult = paymentProcessQueryBiz.PaymentExecuteOrder(
                orderParam
                , orderParamEtc
                , paymenPayMethodtInfo
                , paymentDataOrderInfoList
                , paymentDataCostBasisInfoList
                , paymentOrderItemCostInfoList);

            #endregion

            #region 주문 이후 처리

            GEPBaseResultT followUpResult = PaymentExecuteOrderFollowUp(orderParam);

            if (followUpResult.RetCode != 0)
            {
                orderResult.Result = followUpResult;
            }

            #endregion

            #region 주문 내역 조회

            List<PaymentGEPOrderMultiResultT> orderItemList = GetExecuteOrderItemList(paymentDataOrderInfoList);

            #endregion

            #region 주문 CleanUp

            try
            {
                PaymentExecuteOrderCleanUp(orderParam);
            }
            catch
            {

            }

            #endregion

            paymentExecuteOrderResult.OrderResultList.AddRange(orderItemList);

            #endregion

            #region 주문 결과 처리

            if (paymentExecuteOrderResult.OrderResultList == null)
            {
                orderResult.Result.RetCode = -1107;
                orderResult.Result.RetMessage = "주문 접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다";
            }
            else
            {
                if (paymentExecuteOrderResult.OrderResultList.Count <= 0)
                {
                    orderResult.Result.RetCode = -1108;
                    orderResult.Result.RetMessage = "주문 접수중에 문제가 발생하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다";
                }
                else
                {
                    orderResult.Result.RetCode = paymentExecuteOrderResult.OrderResultList[0].RetCode;
                    orderResult.Result.RetMessage = paymentExecuteOrderResult.OrderResultList[0].RetReason;

                    orderResult.OrderResultList.AddRange(paymentExecuteOrderResult.OrderResultList);
                }
            }

            #endregion

            return orderResult;
        }
Example #5
0
        /// <summary>
        /// 주문 후 뒷처리
        /// </summary>
        /// <param name="paymentProcessResult"></param>
        /// <param name="requestInfo"></param>
        /// <returns></returns>
        private void PaymentProcessFollowUp(PaymentGEPPaymentProcessResultT paymentProcessResult, PaymentRequestInfoT requestInfo)
        {
            PaymentBiz paymentBiz = new PaymentBiz();

            string oType = "N";
            int orderResultPackNo = 0;
            string orderResultOrderNo = string.Empty;
            string orderResultOrderItemNo = string.Empty;

            if (paymentProcessResult.OrderResultList != null && paymentProcessResult.OrderResultList.Count > 0)
            {
                int orderResultRtnCode = paymentProcessResult.OrderResultList[0].RetCode;
                orderResultPackNo = paymentProcessResult.OrderResultList[0].PackNo;

                if (orderResultRtnCode == 0)
                {
                    PaymentProcessQueryBiz paymentProcessQueryBiz = new PaymentProcessQueryBiz();
                    foreach (PaymentGEPOrderMultiResultT item in paymentProcessResult.OrderResultList)
                    {
                        orderResultOrderNo = PaymentUtil.AddComma(orderResultOrderNo + item.OrderNo.ToString().Trim());
                        orderResultOrderItemNo = PaymentUtil.AddComma(orderResultOrderItemNo + item.OrderNo.ToString().Trim());

                        // [skip] 흥정하기(BAR)시 처리 skip

                        // 사자 주문완료 후 선택 옵션이 존재하면 재고를 차감 후 상품 상태를 변경한다.
                        // Item 에서 재고관리를 하면 수량을 차감하고 상태를 변경한다.
                        List<PaymentOptionDsSelOrderInfoT> paymentDsSelOrderInfoList = paymentProcessQueryBiz.GetPaymentDsSelOrderInfo(item.OrderGdNo, (long)item.OrderNo);

                        if (paymentDsSelOrderInfoList != null && paymentDsSelOrderInfoList.Count > 0)
                        {
                            foreach (PaymentOptionDsSelOrderInfoT optionItem in paymentDsSelOrderInfoList)
                            {
                                PaymentOptionInfoChangeResultT updateOptionInfoChange = paymentProcessQueryBiz.UpdateOptionInfoChange(item.OrderGdNo, optionItem.OptNo, optionItem.InfoType, optionItem.OptOrderCnt);

                                if (updateOptionInfoChange != null)
                                {
                                    if (updateOptionInfoChange.RetCode == -101)
                                    {
                                        // 재고 수량이 부족하면 취소 화면으로 보냄 (구매자는 알필요가 없음)

                                        // asp 소스에서 실제적으로 에러를 내진 않음
                                    }
                                }
                            }
                        }
                    }

                    if (requestInfo.SafecallUse.ToUpper() == "Y")
                    {
                        paymentBiz.SetSafeCall(requestInfo.CustNo, orderResultPackNo);
                    }

                    paymentBiz.SetOrderReservedDiscount(requestInfo.BasketPid);
                }
                else if (orderResultRtnCode == -509 || orderResultRtnCode == -739 || orderResultRtnCode == -122 || orderResultRtnCode == -123 || orderResultRtnCode == -124 || orderResultRtnCode == -608)
                {
                    // 일반 상품 주문시 재고 부족 에러 처리
                    if (orderResultRtnCode == -122 || orderResultRtnCode == -124)
                    {
                        //sRealCostBasisNo = .Fields("err_cost_basis_nos") & "|" & .Fields("err_cost_basis_kinds")
                    }

                    RollbackGepOrderStatus(paymentProcessResult.OrderResultList);

                    throw new PaymentProcessBizException(paymentProcessResult.OrderResultList[0].RetCode, paymentProcessResult.OrderResultList[0].RetReason);
                }
                else if (orderResultRtnCode.ToString().Length == 6)
                {
                    // this error codes are only for queries not exist in db transaction. the error codes are 6 digits (include minus)

                    // delete basket info
                    if (requestInfo.OrderWayKind.ToUpper() == "PAK" && !string.IsNullOrEmpty(requestInfo.BasketPid.Trim()))
                    {
                        paymentBiz.BasketInfoDeleteAll(oType, requestInfo.BasketPid, requestInfo.SelectedOrderIdxs, orderResultPackNo);
                    }
                }
                else
                {
                    RollbackGepOrderStatus(paymentProcessResult.OrderResultList);

                    throw new PaymentProcessBizException(paymentProcessResult.OrderResultList[0].RetCode, paymentProcessResult.OrderResultList[0].RetReason);
                }
            }
            else
            {
                RollbackGepOrderStatus(paymentProcessResult.OrderResultList);

                throw new PaymentProcessBizException(paymentProcessResult.OrderResultList[0].RetCode, paymentProcessResult.OrderResultList[0].RetReason);
            }

            // convert : 여기까지가 line 2440
            // 장바구니 삭제
            if (requestInfo.OrderWayKind.ToUpper() == "PAK" && !string.IsNullOrEmpty(requestInfo.BasketPid.Trim()))
            {
                paymentBiz.BasketInfoDeleteAll(oType, requestInfo.BasketPid, requestInfo.SelectedOrderIdxs, orderResultPackNo);
            }

            // fix : 이부분 구현할 것
            // Update order log with pack_no

            // convert : 여기까지가 line 2476
        }