예제 #1
0
        public ActionResult PaymentFail(int code)
        {
            if (!ModelState.IsValid)
            {
                return Redirect("/");
            }

            PaymentFailInfoT paymentFailInfo = new PaymentBiz().GetPaymentFailInfo(code);

            if (paymentFailInfo == null)
            {
                paymentFailInfo = new PaymentFailInfoT
                {
                    ErrorCode = code,
                    LClassMsgKor = "주문접수시 문제가 발생하여",
                    ErrorMsgKor = "주문 접수중에 문제가 발생했습니다. 다시 시도해 주시기 바랍니다."
                };
            }

            dynamic o = new ExpandoObject();
            o.ErrorResult = new
            {
                Code = paymentFailInfo.ErrorCode,
                Title = paymentFailInfo.LClassMsgKor,
                Message = paymentFailInfo.ErrorMsgKor
            }.ToExpando();

            return View(o);
        }
예제 #2
0
        public void GetCBTBasketItemBasicInfo(string pid, string orderGubun, string selectOrderIdx)
        {
            List<GEPBasketItemBasicInfoT> list = new PaymentBiz().GetGEPBasketItemBasicInfo(pid, orderGubun, selectOrderIdx);

            foreach (GEPBasketItemBasicInfoT item in list)
            {
                Trace.DumpBusinessEntity(item);
            }
        }
예제 #3
0
        public void GetGMKTContrResult()
        {
            int latest = 14;

            DateTime startDate = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")).AddDays(-latest);
            DateTime endDate = startDate.AddDays(1);

            List<GMKTContrResultT> aa = new PaymentBiz().GetGMKTContrResult(startDate, endDate);

            foreach (GMKTContrResultT t in aa)
            {
                System.Console.WriteLine(t.GEPOrderNo.ToString());
            }
        }
예제 #4
0
        public void GetItemCostRateInfo(string itemNo)
        {
            ItemCostRateInfoT data = new PaymentBiz().GetItemCostRateInfo(itemNo);

            Trace.WriteLine(data == null ? "널" : "널 아님");
        }
예제 #5
0
 public void GetBasketOrderCostInfo(string pid, string gdSelNo, string itemNo, string callFrom)
 {
     List < BasketOrderCostInfoT > list = new PaymentBiz().GetBasketOrderCostInfo(pid, gdSelNo, itemNo, callFrom);
 }
예제 #6
0
        public void PackNo()
        {
            int packNo;

            packNo = new PaymentBiz().GetNewPackNo();

            Trace.WriteLine(string.Format("pack_no : {0}", packNo));
        }
예제 #7
0
        public void GetPaymentItemInfoPolicy(string pid, string goodsInfo)
        {
            List<PaymentItemInfoPolicyT> list = new PaymentBiz().GetPaymentItemInfoPolicy(pid, goodsInfo);

            foreach (PaymentItemInfoPolicyT item in list)
            {
                Trace.DumpBusinessEntity(item);
            }
        }
예제 #8
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;
        }
예제 #9
0
        /// <summary>
        /// 파라메터 초기화
        /// </summary>
        /// <returns></returns>
        private PaymentRequestInfoT InitPaymentRequestInfo(PaymentRequestInfoT paymentRequestInfo)
        {
            PaymentRequestInfoT requestInfo = paymentRequestInfo;

            string reFormCostBasisNo;
            int gBankCode = 60000;
            int gBankMileCode = 70000;
            int gBankBCashCode = 170000;
            //int authOkCashBagCode = 190000;
            //int authSOilCode = 200000;
            //int authCultureCode = 210000;
            //int authDreamCode = 220000;
            //int authPointparkCode = 230000;
            //string paymentType = string.Empty;

            int authTotalPayPrice = 0;

            requestInfo.PaySaveCardYN = "N";

            if (requestInfo.SaveFlag.ToUpper() == "A" || requestInfo.SaveFlag.ToUpper() == "P" || requestInfo.SaveFlag.ToUpper() == "I")
                requestInfo.PaySaveCardYN = "Y";

            if (!requestInfo.JaehuID.EndsWith(","))
                requestInfo.JaehuID = PaymentUtil.AddComma(requestInfo.JaehuID);

            if (!requestInfo.PolicyNo.EndsWith(","))
                requestInfo.PolicyNo = PaymentUtil.AddComma(requestInfo.PolicyNo);

            if (requestInfo.SafecallUse != "Y")
                requestInfo.SafecallUse = "N";

            //if (paymentParam.OkcashbagSaveYN != "Y") { paymentParam.OkcashbagSaveYN = "N"; }

            if (string.IsNullOrEmpty(requestInfo.MemberType) && requestInfo.CustNo == "100543129")
                requestInfo.MemberType = "NON";
            else
                requestInfo.MemberType = "MEM";

            // 비회원 예매는 지원하지 않는다.
            if (!requestInfo.MemberType.Equals("MEM", StringComparison.InvariantCultureIgnoreCase))
            {
                throw new PaymentProcessBizException(-9100, "주문 정보가 올바르지 않습니다");
            }

            requestInfo.ReceiverAddress1 = requestInfo.Oaddress1.Replace("'", "`");
            requestInfo.ReceiverAddress2 = requestInfo.Oaddress2.Replace("'", "`");
            requestInfo.ReceiverPhoneNo = string.Format("{0}-{1}-{2}", requestInfo.ReceiverPhoneNo1, requestInfo.ReceiverPhoneNo2, requestInfo.ReceiverPhoneNo3);
            requestInfo.ReceiverHpNo = string.Format("{0}-{1}-{2}", requestInfo.ReceiverHpNo1, requestInfo.ReceiverHpNo2, requestInfo.ReceiverHpNo3);
            requestInfo.ReceiverZipCode = string.Format("{0}-{1}", requestInfo.OzipCode1, requestInfo.OzipCode2);
            requestInfo.BuyerTelNo = string.Format("{0}-{1}-{2}", requestInfo.BuyerTelNo1, requestInfo.BuyerTelNo2, requestInfo.BuyerTelNo3);

            requestInfo.ISOCode = "KR";
            requestInfo.PaymentMethod = "0";

            requestInfo.CardNumber = (requestInfo.CardNumber1 + requestInfo.CardNumber2 + requestInfo.CardNumber3 + requestInfo.CardNumber4).Replace(" ", string.Empty).Replace("-", string.Empty);

            if (!requestInfo.CardCash.Equals("GBANK_PAYPAL", StringComparison.InvariantCultureIgnoreCase))
                requestInfo.GbankGubun = string.Empty;

            requestInfo.DepositName = requestInfo.DepositName.Length >= 20 ? requestInfo.DepositName.Substring(0, 20) : requestInfo.DepositName.Substring(0, requestInfo.DepositName.Length);

            requestInfo.RealDeliveryInfo = FrontEncryption.CrpDecrypt(requestInfo.RealDeliveryInfo);
            requestInfo.RealDeliveryFeeInfo = FrontEncryption.CrpDecrypt(requestInfo.RealDeliveryFeeInfo);

            string[] arrGdSelNos = requestInfo.GdSelNo.Split(PaymentConstant.CommaSeperator);
            for (int i = 0, gdSelNosArrLength = arrGdSelNos.Length; i < gdSelNosArrLength; i++)
            {
                if (!string.IsNullOrEmpty(arrGdSelNos[i]))
                {
                    requestInfo.RealDeliveryInfo = requestInfo.RealDeliveryInfo.Replace(PaymentConstant.MainDelimiter + arrGdSelNos[i] + PaymentConstant.MainDelimiter, string.Empty);
                    requestInfo.RealDeliveryFeeInfo = requestInfo.RealDeliveryFeeInfo.Replace(PaymentConstant.MainDelimiter + arrGdSelNos[i] + PaymentConstant.MainDelimiter, string.Empty);
                }
            }

            requestInfo.RealDeliveryGroupNo = requestInfo.RealDeliveryInfo.Replace(" ", string.Empty);
            requestInfo.RealDeliveryFee = requestInfo.RealDeliveryFeeInfo.Replace(" ", string.Empty);

            if (!string.IsNullOrEmpty(requestInfo.CouponNo))
                requestInfo.CouponNo = PaymentUtil.AddComma(requestInfo.CouponNo);
            else
                requestInfo.CouponNo = PaymentUtil.AddComma(PaymentConstant.MainDelimiter);

            string[] arrPlusDiscountKey = FrontEncryption.TQDecode(requestInfo.PlusDiscountKey).Split(PaymentConstant.MainDelimiter.ToCharArray());

            if (arrPlusDiscountKey.Length > 7)
            {
                if (arrPlusDiscountKey[6].Replace(" ", string.Empty).Trim().Equals(requestInfo.PlusDiscountChkVal, StringComparison.InvariantCultureIgnoreCase))
                {
                    requestInfo.PlusDisBdNos = arrPlusDiscountKey[1].Replace(" ", string.Empty).Trim();
                    requestInfo.PlusDisBcCondNos = arrPlusDiscountKey[2].Replace(" ", string.Empty).Trim();
                    requestInfo.PlusDisSatisCounts = arrPlusDiscountKey[3].Replace(" ", string.Empty).Trim();
                }
                else
                {
                    requestInfo.PlusDisBdNos = "0,";
                    requestInfo.PlusDisBcCondNos = "0,";
                    requestInfo.PlusDisSatisCounts = "0,";
                }
            }
            else
            {
                requestInfo.PlusDisBdNos = "0,";
                requestInfo.PlusDisBcCondNos = "0,";
                requestInfo.PlusDisSatisCounts = "0,";
            }

            string[] arrSetCostCountKey = FrontEncryption.TQDecode(requestInfo.SetCostCountKey).Split(PaymentConstant.MainDelimiter.ToCharArray());

            if (arrSetCostCountKey.Length > 8)
            {
                if (arrSetCostCountKey[7].Replace(" ", string.Empty).Trim().Equals(requestInfo.SetCostCountChkVal, StringComparison.InvariantCultureIgnoreCase))
                {
                    requestInfo.SetCostNos = arrSetCostCountKey[1].Replace(" ", string.Empty).Trim();
                    requestInfo.SetCostScdNos = arrSetCostCountKey[2].Replace(" ", string.Empty).Trim();
                    requestInfo.SetCondScdNos = arrSetCostCountKey[3].Replace(" ", string.Empty).Trim();
                    requestInfo.SetCostSatisCounts = arrSetCostCountKey[4].Replace(" ", string.Empty).Trim();
                }
                else
                {
                    requestInfo.SetCostNos = "0,";
                    requestInfo.SetCostScdNos = "0,";
                    requestInfo.SetCondScdNos = "0,";
                    requestInfo.SetCostSatisCounts = "0,";
                }
            }
            else
            {
                requestInfo.SetCostNos = "0,";
                requestInfo.SetCostScdNos = "0,";
                requestInfo.SetCondScdNos = "0,";
                requestInfo.SetCostSatisCounts = "0,";
            }

            string[] arrPackCostcountKey = FrontEncryption.TQDecode(requestInfo.PackCostCountKey).Split(PaymentConstant.MainDelimiter.ToCharArray());

            if (arrSetCostCountKey.Length > 8)
            {
                if (arrPackCostcountKey[7].Replace(" ", string.Empty).Trim().Equals(requestInfo.PackCostCountChkVal, StringComparison.InvariantCultureIgnoreCase))
                {
                    requestInfo.PackCostNos = arrPackCostcountKey[1].Replace(" ", string.Empty).Trim();
                    requestInfo.PackCostPcdNos = arrPackCostcountKey[2].Replace(" ", string.Empty).Trim();
                    requestInfo.PackCondPcdNos = arrPackCostcountKey[3].Replace(" ", string.Empty).Trim();
                    requestInfo.PackCostSatisCounts = arrPackCostcountKey[4].Replace(" ", string.Empty).Trim();
                }
                else
                {
                    requestInfo.PackCostNos = "0,";
                    requestInfo.PackCostPcdNos = "0,";
                    requestInfo.PackCondPcdNos = "0,";
                    requestInfo.PackCostSatisCounts = "0,";
                }
            }
            else
            {
                requestInfo.PackCostNos = "0,";
                requestInfo.PackCostPcdNos = "0,";
                requestInfo.PackCondPcdNos = "0,";
                requestInfo.PackCostSatisCounts = "0,";
            }

            // convert : 여기까지가 line 534

            string[] arrRealCostBasisNo = requestInfo.RealCostBasisNo.Split(PaymentConstant.CommaSeperator);
            requestInfo.RealCostBasisNo = string.Empty;

            for (int i = 0, realCostBasisNoArrLength = arrRealCostBasisNo.Length; i < realCostBasisNoArrLength; i++)
            {
                if (!string.IsNullOrEmpty(arrRealCostBasisNo[i]))
                {
                    reFormCostBasisNo = string.Empty;
                    string[] arrReFormCostBasisNo = arrRealCostBasisNo[i].Split(PaymentConstant.MainDelimiter.ToCharArray());
                    for (int j = 0, reFormCostBasisNoArrLength = arrReFormCostBasisNo.Length; j < reFormCostBasisNoArrLength; j++)
                    {
                        arrReFormCostBasisNo[j] = arrReFormCostBasisNo[j].Trim();
                        if (!string.IsNullOrEmpty(arrReFormCostBasisNo[j]) && arrReFormCostBasisNo[j] != "0")
                        {
                            reFormCostBasisNo = reFormCostBasisNo + arrReFormCostBasisNo[j] + PaymentConstant.MainDelimiter;
                        }
                    }

                    arrRealCostBasisNo[i] = reFormCostBasisNo;
                }
                else
                {
                    arrRealCostBasisNo[i] = "0" + PaymentConstant.MainDelimiter;
                }

                if (string.IsNullOrEmpty(arrRealCostBasisNo[i]))
                    arrRealCostBasisNo[i] = "0" + PaymentConstant.MainDelimiter;

                requestInfo.RealCostBasisNo = requestInfo.RealCostBasisNo + arrRealCostBasisNo[i] + new string(PaymentConstant.CommaSeperator);
            }

            // convert : 여기까지가 line 564

            // fix : [skip] 제로마진 제휴코드일경우, 현재 사용가능한 또는 구매중인 회원권이 있는지 체크
            // convert : 여기까지가 line 627

            // fix : OrderMemoCount가 제대로 안와서 일단 임시로..
            requestInfo.OrderMemoCount = requestInfo.ItemCount;
            // OrderMemoCount 임시 끝

            if (requestInfo.GoodsType.ToUpper() != "SELLER_ECOUPON")
            {
                if (requestInfo.OrderMemoCount == 1)
                {
                    for (int i = 0; i < requestInfo.ItemCount; i++)
                    {
                        requestInfo.DelMemo = (i != 0 ? requestInfo.DelMemo : string.Empty) + string.Empty + PaymentConstant.MainDelimiter;
                        //paymentParam.DelMemo = (i != 0 ? paymentParam.DelMemo : string.Empty) + Util.GetStringByte(paymentParam.DelMemo0.Replace("'", "`").Replace("\"", string.Empty).Replace(PaymentConstant.MainDelimiter, string.Empty), 100) + PaymentConstant.MainDelimiter;
                    }
                }
                else if (requestInfo.OrderMemoCount > 1)
                {
                    for (int i = 0; i < requestInfo.ItemCount; i++)
                    {
                        requestInfo.DelMemo = (i != 0 ? requestInfo.DelMemo : string.Empty) + string.Empty + PaymentConstant.MainDelimiter;
                        //paymentParam.DelMemo = (i != 0 ? paymentParam.DelMemo : string.Empty) + Util.GetStringByte(paymentParam.DelMemo0.Replace("'", "`").Replace("\"", string.Empty).Replace(PaymentConstant.MainDelimiter, string.Empty), 100) + PaymentConstant.MainDelimiter;
                    }
                }
                else
                {
                    requestInfo.DelMemo = PaymentConstant.MainDelimiter;
                }
            }
            else
            {
                requestInfo.DelMemo = PaymentConstant.MainDelimiter;
            }
            // convert : 여기까지가 line 656

            requestInfo.KvpSessionkey = HttpUtility.UrlEncode(requestInfo.KvpSessionkey);
            requestInfo.KvpEncdata = HttpUtility.UrlEncode(requestInfo.KvpEncdata);

            // convert : 여기까지가 line 668

            // fix : [skip] 경매 정보
            // convert : 여기까지가 line 692

            // convert : 여기까지가 line 768 (request 변수 assign)

            // fix : [skip] 선물하기
            //paymentParam.SendGiftYN = "N";
            //paymentParam.GiftReceiverCustNo = string.Empty;
            //paymentParam.GiftReceiverName = string.Empty;
            //paymentParam.GiftReceiverHpNo = string.Empty;
            //paymentParam.GiftReceiverID = string.Empty;
            //paymentParam.GiftReceiverEmail = string.Empty;
            //paymentParam.GiftMemo = string.Empty;
            //paymentParam.SenderInfoKindI = string.Empty;
            //paymentParam.SenderInfoKindE = string.Empty;
            //paymentParam.SenderInfoKindH = string.Empty;
            //paymentParam.SendGiftWay = string.Empty;
            //paymentParam.GiftMessageKind = string.Empty;
            // convert : 여기까지가 line 862

            // fix : [skip] e-coupon gift
            // convert : 여기까지가 line 898

            // fix : [skip] 온라인퀵서비스
            // convert : 여기까지가 line 928

            string[] arrCsdGdNo = requestInfo.CsdGdNo.Split(PaymentConstant.CommaSeperator);
            string[] arrCsdGdSelNo = requestInfo.CsdGdSelNo.Split(PaymentConstant.CommaSeperator);
            string[] arrCsdOrderCnt = requestInfo.CsdOrderCount.Split(PaymentConstant.CommaSeperator);
            string[] arrCsdCostBasisNo = requestInfo.CsdCostBasisNo.Split(PaymentConstant.CommaSeperator);
            string[] arrCsdCostPrice = requestInfo.CsdCostPrice.Split(PaymentConstant.CommaSeperator);

            if (requestInfo.CsdUseYN.ToUpper() == "Y")
            {

                if (requestInfo.VirtualCardKind1 != "26007" && requestInfo.VirtualCardKind1 != "26001" && requestInfo.VirtualCardKind1 != "26025" && requestInfo.VirtualCardKind1 != "26012" && requestInfo.VirtualCardKind1 != "26008" && requestInfo.VirtualCardKind1 != "26006" &&
                    requestInfo.VirtualCardKind2 != "26007" && requestInfo.VirtualCardKind2 != "26001" && requestInfo.VirtualCardKind2 != "26025" && requestInfo.VirtualCardKind2 != "26012" && requestInfo.VirtualCardKind2 != "26008" && requestInfo.VirtualCardKind2 != "26006" &&
                    requestInfo.VirtualCardKind3 != "26007" && requestInfo.VirtualCardKind3 != "26001" && requestInfo.VirtualCardKind3 != "26025" && requestInfo.VirtualCardKind3 != "26012" && requestInfo.VirtualCardKind3 != "26008" && requestInfo.VirtualCardKind3 != "26006" &&
                    requestInfo.VirtualCardKind4 != "26007" && requestInfo.VirtualCardKind4 != "26001" && requestInfo.VirtualCardKind4 != "26025" && requestInfo.VirtualCardKind4 != "26012" && requestInfo.VirtualCardKind4 != "26008" && requestInfo.VirtualCardKind4 != "26006" &&
                    requestInfo.VirtualCardKind5 != "26007" && requestInfo.VirtualCardKind5 != "26001" && requestInfo.VirtualCardKind5 != "26025" && requestInfo.VirtualCardKind5 != "26012" && requestInfo.VirtualCardKind5 != "26008" && requestInfo.VirtualCardKind5 != "26006")
                {
                    // fix : DB 입력부분 만들것
                    //Call WriteErrorOrderInfo (CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, "할인을 받을 수 없는 카드로 결제하였습니다.", "-158", "NT")

                    throw new PaymentProcessBizException(-158, "할인을 받을 수 없는 카드로 결제하였습니다");
                }

                long csdOrderIdx = 0;

                for (int i = 0, csdGdNoArrLength = arrCsdGdNo.Length; i < csdGdNoArrLength; i++)
                {
                    if (!string.IsNullOrEmpty(arrCsdGdNo[i]))
                    {
                        BasketCardDiscountSetResultT basketCardDiscountSetResult = new PaymentBiz().SetBasketCardDiscount(requestInfo.BasketPid, arrCsdGdSelNo[i], arrCsdGdNo[i], requestInfo.CustNo, Convert.ToInt32(arrCsdOrderCnt[i]), arrCsdCostBasisNo[i], Convert.ToDecimal(arrCsdCostPrice[i]), csdOrderIdx);
                        if (basketCardDiscountSetResult != null)
                        {
                            if (basketCardDiscountSetResult.RetCode.ToUpper() != "OK")
                            {
                                throw new PaymentProcessBizException(-158, basketCardDiscountSetResult.RetMessage);
                            }
                        }
                    }
                }
            }

            // convert : 여기까지가 line 986

            // fix : [skip] 사진 인화 시 키프트샵 관련 내용들
            // convert : 여기까지가 line 994

            // convert : 여기까지가 line 1064

            // fix : [skip] 소분류 카테고리 기준 제휴사포인트 비노출
            // convert : 여기까지가 line 1098

            // fix : [skip] 도토리 상품권에 대한 현금잔고 결제 차단
            // convert : 여기까지가 line 1108

            PaymentCustomInfoT customInfo = new PaymentBiz().GetPaymentCustomInfo(requestInfo.CustNo);

            if (customInfo == null)
            {
                throw new PaymentProcessBizException(-409, "회원 구분을 알 수 없습니다. 다시 주문해 주세요. 주문은 접수되지 않았습니다.");
            }

            requestInfo.LoginID = customInfo.LoginID;

            authTotalPayPrice = requestInfo.TotalPayPrice;

            if (authTotalPayPrice > 0)
            {
                if (authTotalPayPrice == requestInfo.GBankMoney)
                {
                    requestInfo.CardCash = "CASH";
                    requestInfo.PaymentName = "G통장";
                    requestInfo.PaymentType = string.Empty;
                    requestInfo.DepositName = customInfo.CustName;
                    requestInfo.Vaccount = requestInfo.GBankVAccount;
                    requestInfo.VacntNo = requestInfo.GBankAcntNo;
                    requestInfo.Gbank = gBankCode;
                }
                else if (authTotalPayPrice == requestInfo.GBankMileage)
                {
                    requestInfo.CardCash = "G_MILE";
                    requestInfo.PaymentName = "마일리지결제";
                    requestInfo.PaymentType = string.Empty;
                    requestInfo.DepositName = customInfo.CustName;
                    requestInfo.Vaccount = requestInfo.GBankMileageVAccount;
                    requestInfo.VacntNo = requestInfo.GBankBcashAcntNo;
                    requestInfo.Gbank = gBankMileCode;
                }
                else if (authTotalPayPrice == requestInfo.GBankBcash)
                {
                    requestInfo.CardCash = "BCASH";
                    requestInfo.PaymentName = "북캐시";
                    requestInfo.PaymentType = string.Empty;
                    requestInfo.DepositName = customInfo.CustName;
                    requestInfo.Vaccount = requestInfo.GBankBcashVAccount;
                    requestInfo.VacntNo = requestInfo.GBankBcashAcntNo;
                    requestInfo.Gbank = gBankBCashCode;
                }
                // fix : [skip] 북캐시 이하는 복합결제이므로 생략 (복합결제 없음)
            }

            // convert : 여기까지가 line 1175

            if (!string.IsNullOrEmpty(requestInfo.ItemNo))
                requestInfo.ItemNo = PaymentUtil.AddComma(requestInfo.ItemNo);

            if (!string.IsNullOrEmpty(requestInfo.TradWay))
                requestInfo.TradWay = PaymentUtil.AddComma(requestInfo.TradWay);

            if (!string.IsNullOrEmpty(requestInfo.OrderPrice))
                requestInfo.OrderPrice = PaymentUtil.AddComma(requestInfo.OrderPrice);
            else
                requestInfo.OrderPrice = PaymentUtil.AddComma("0");

            //if (!string.IsNullOrEmpty(paymentParam.SelItemPrice))
            //    paymentParam.SelItemPrice = PaymentUtil.AddComma(paymentParam.SelItemPrice);
            //else
            //    paymentParam.SelItemPrice = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.Interval))
                requestInfo.Interval = PaymentUtil.AddComma(requestInfo.Interval);
            else
                requestInfo.Interval = PaymentUtil.AddComma("3");

            if (!string.IsNullOrEmpty(requestInfo.PosShopCd) || !requestInfo.PosShopCd.EndsWith(","))
                requestInfo.PosShopCd = PaymentUtil.AddComma(requestInfo.PosShopCd);

            if (!string.IsNullOrEmpty(requestInfo.PosClassCd) || !requestInfo.PosClassCd.EndsWith(","))
                requestInfo.PosClassCd = PaymentUtil.AddComma(requestInfo.PosClassCd);

            if (!string.IsNullOrEmpty(requestInfo.PosClassKind) || !requestInfo.PosClassKind.EndsWith(","))
                requestInfo.PosClassKind = PaymentUtil.AddComma(requestInfo.PosClassKind);

            if (!requestInfo.DelMemo.EndsWith(PaymentConstant.MainDelimiter))
                requestInfo.DelMemo = requestInfo.DelMemo + PaymentConstant.MainDelimiter;

            if (string.IsNullOrEmpty(requestInfo.OrderCounts) || requestInfo.OrderCounts == "0")
                requestInfo.OrderCounts = PaymentUtil.AddComma("1");
            else
                requestInfo.OrderCounts = PaymentUtil.AddComma(requestInfo.OrderCounts);

            if (string.IsNullOrEmpty(requestInfo.ReceiverAddress1)) { requestInfo.ReceiverAddress1 = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.ReceiverAddress2)) { requestInfo.ReceiverAddress2 = "N/A"; }
            if (requestInfo.ReceiverZipCode == "-") { requestInfo.ReceiverZipCode = "N/A"; }
            if (requestInfo.ReceiverPhoneNo == "--") { requestInfo.ReceiverPhoneNo = "N/A"; }
            if (requestInfo.ReceiverHpNo == "--") { requestInfo.ReceiverHpNo = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.IsRcvMail)) { requestInfo.IsRcvMail = "Y"; }
            if (string.IsNullOrEmpty(requestInfo.HalbuType) || requestInfo.HalbuType == "0") { requestInfo.HalbuType = "N"; }
            if (string.IsNullOrEmpty(requestInfo.ReceiveMailYn)) { requestInfo.ReceiveMailYn = "N"; }
            if (string.IsNullOrEmpty(requestInfo.ReceiveSmsYN)) { requestInfo.ReceiveSmsYN = "N"; }
            if (string.IsNullOrEmpty(requestInfo.ReceiverName)) { requestInfo.ReceiverName = customInfo.CustName; }

            if (!string.IsNullOrEmpty(requestInfo.TaxIssueYN))
                requestInfo.TaxIssueYN = PaymentUtil.AddComma(requestInfo.TaxIssueYN);
            else
                requestInfo.TaxIssueYN = PaymentUtil.AddComma("N");

            if (!string.IsNullOrEmpty(requestInfo.CashIssueYN))
                requestInfo.CashIssueYN = PaymentUtil.AddComma(requestInfo.CashIssueYN);
            else
                requestInfo.CashIssueYN = PaymentUtil.AddComma("N");

            /*
            if (paymentParam.CardCash.Equals("TCASH", StringComparison.InvariantCultureIgnoreCase))
            {
                paymentParam.TaxIssueYN = paymentParam.TaxIssueYN.Replace("Y", "N");
                paymentParam.CashIssueYN = paymentParam.CashIssueYN.Replace("Y", "N");
            }
            */

            if (requestInfo.GoodsType.Equals("GCASH", StringComparison.InvariantCultureIgnoreCase)) { requestInfo.ReceiverName = requestInfo.ReceiverName.Length >= 10 ? requestInfo.ReceiverName.Substring(0, 10) : requestInfo.ReceiverName.Substring(0, requestInfo.ReceiverName.Length); }

            if (!requestInfo.GoodsType.Equals("SELLER_ECOUPON", StringComparison.InvariantCultureIgnoreCase) &&
                (requestInfo.ReceiverAddress1 == "N/A" || requestInfo.ReceiverAddress2 == "N/A"
                || requestInfo.ReceiverZipCode == "N/A" || requestInfo.ReceiverPhoneNo == "N/A"
                || requestInfo.ReceiverHpNo == "N/A" || string.IsNullOrEmpty(requestInfo.ReceiverName)))
            {
                throw new PaymentProcessBizException(-201, "배송지 정보에 문제가 있습니다. 확인후 다시 주문해 주시기 바랍니다");
            }

            //if (string.IsNullOrEmpty(paymentParam.TransSeqNo)) { paymentParam.TransSeqNo = "0"; }

            // convert : 여기까지가 line 1324

            #region 결제수단 정보

            PaymentPayMethodInfo payMethodInfo = new PaymentPayMethodInfo(requestInfo);

            try
            {
                payMethodInfo.SetPayMethodInfo();
            }
            catch (PaymentProcessBizException pEx)
            {
                throw pEx;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            requestInfo.CardCash = payMethodInfo.orcCardCash;
            requestInfo.VirtualCardKind = payMethodInfo.orcMainCard;
            requestInfo.AcntType = payMethodInfo.orcAcntType;
            requestInfo.PaymentCode = payMethodInfo.orcPaymentSettlCode;

            requestInfo.Installmonth = payMethodInfo.orcInstallmonth;
            requestInfo.CardNumber = payMethodInfo.orcCardNumber;
            requestInfo.CardYear = payMethodInfo.orcCardYear;
            requestInfo.CardMonth = payMethodInfo.orcCardMonth;
            requestInfo.CardPwd = payMethodInfo.orcCardPwd;
            requestInfo.SocialNo2 = payMethodInfo.orcSocialNo2;
            requestInfo.Xid = payMethodInfo.orcXid;
            requestInfo.Eci = payMethodInfo.orcEci;
            requestInfo.Cavv = payMethodInfo.orcCavv;
            requestInfo.KvpSessionkey = payMethodInfo.orcKVPSessionkey;
            requestInfo.KvpEncdata = payMethodInfo.orcKVPEncdata;
            requestInfo.KvpCardcode = payMethodInfo.orcKVPCardCode;

            #endregion

            // convert : 여기까지가 line 1417

            if (requestInfo.AcntType.ToUpper() == "A3" && requestInfo.CardCash.ToUpper() == "CASH" && (string.IsNullOrEmpty(requestInfo.Vaccount) || requestInfo.Vaccount.Length < 3) && requestInfo.OncreditYN.ToUpper() != "N" && requestInfo.OncreditYN.ToUpper() != "M")
            {
                throw new PaymentProcessBizException(-344, "계좌정보를 찾을 수 없습니다. 결제가 이루어지지 않았으니, 확인후 다시 주문해 주시기 바랍니다");
            }

            if (Array.IndexOf(new string[] { "CASH", "TRANS", "GBANK_PAYPAL", "GBANK", "CMA", "TCASH", "HRS" }, requestInfo.CardCash.ToUpper()) >= 0)
            {
                if (requestInfo.RequestTax.ToUpper() != "Y")
                {
                    requestInfo.TaxRegNo = string.Empty;
                    requestInfo.TaxCompanyName = string.Empty;
                    requestInfo.TaxBoss = string.Empty;
                    requestInfo.TaxAddress = string.Empty;
                    requestInfo.TaxRcvAddress = string.Empty;
                    requestInfo.TaxZipCode = string.Empty;
                    requestInfo.TaxCategory = string.Empty;
                    requestInfo.TaxKind = string.Empty;
                    requestInfo.TaxEmail = string.Empty;
                    requestInfo.TaxPhone = string.Empty;
                    requestInfo.TaxMemo = string.Empty;
                    requestInfo.TaxChargeTeam = string.Empty;
                    requestInfo.TaxChargeName = string.Empty;
                }
            }
            else
            {
                requestInfo.TaxRegNo = string.Empty;
                requestInfo.TaxCompanyName = string.Empty;
                requestInfo.TaxBoss = string.Empty;
                requestInfo.TaxAddress = string.Empty;
                requestInfo.TaxRcvAddress = string.Empty;
                requestInfo.TaxZipCode = string.Empty;
                requestInfo.TaxCategory = string.Empty;
                requestInfo.TaxKind = string.Empty;
                requestInfo.TaxEmail = string.Empty;
                requestInfo.TaxPhone = string.Empty;
                requestInfo.TaxMemo = string.Empty;
                requestInfo.TaxChargeTeam = string.Empty;
                requestInfo.TaxChargeName = string.Empty;
            }

            // convert : 여기까지가 line 1461

            if (string.IsNullOrEmpty(requestInfo.TaxRegNo)) { requestInfo.TaxRegNo = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxCompanyName)) { requestInfo.TaxCompanyName = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxBoss)) { requestInfo.TaxBoss = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxAddress)) { requestInfo.TaxAddress = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxRcvAddress)) { requestInfo.TaxRcvAddress = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxZipCode)) { requestInfo.TaxZipCode = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxCategory)) { requestInfo.TaxCategory = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxKind)) { requestInfo.TaxKind = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxEmail)) { requestInfo.TaxEmail = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxPhone)) { requestInfo.TaxPhone = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxMemo)) { requestInfo.TaxMemo = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxChargeTeam)) { requestInfo.TaxChargeTeam = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.TaxChargeName)) { requestInfo.TaxChargeName = "N/A"; }

            // convert : 여기까지가 line 1514

            // 결제수단이 현금이 아닌 경우 현금 영수증 관련 데이터 날림
            if (Array.IndexOf(new string[] { "CASH", "TRANS", "GBANK_PAYPAL", "GBANK", "CMA", "TCASH", "HRS" }, requestInfo.CardCash.ToUpper()) < 0)
            {
                requestInfo.CashUseType = string.Empty;
                requestInfo.CashRegNo = string.Empty;
                requestInfo.CashName = string.Empty;
                requestInfo.CashPhone = string.Empty;
                requestInfo.CashEmail = string.Empty;
                requestInfo.CashReceiptYN = string.Empty;
                requestInfo.CashIdFlag = string.Empty;
            }
            else
            {
                // Social_No Encryption for cash receipt
                if (!string.IsNullOrEmpty(requestInfo.CashRegNo))
                {
                    if (requestInfo.CashIdFlag.ToUpper() == "SD")
                    {
                        requestInfo.CashRegNo = FrontEncryption.CrpEncrypt(requestInfo.CashRegNo);
                        requestInfo.CashIdFlag = "SE";
                    }
                }
            }

            // convert : 여기까지가 line 1542

            if (string.IsNullOrEmpty(requestInfo.CashUseType)) { requestInfo.CashUseType = "0"; }
            if (string.IsNullOrEmpty(requestInfo.CashRegNo)) { requestInfo.CashRegNo = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.CashName)) { requestInfo.CashName = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.CashPhone)) { requestInfo.CashPhone = "N/A"; }
            if (string.IsNullOrEmpty(requestInfo.CashEmail)) { requestInfo.CashEmail = "N/A"; }

            if (!string.IsNullOrEmpty(requestInfo.RealDeliveryFee))
                requestInfo.RealDeliveryFee = PaymentUtil.AddComma(requestInfo.RealDeliveryFee.Replace(" ", string.Empty));
            else
                requestInfo.RealDeliveryFee = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.RealDeliveryGroupNo))
                requestInfo.RealDeliveryGroupNo = PaymentUtil.AddComma(requestInfo.RealDeliveryGroupNo.Replace(" ", string.Empty));
            else
                requestInfo.RealDeliveryGroupNo = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.RealCostPrice))
                requestInfo.RealCostPrice = PaymentUtil.AddComma(requestInfo.RealCostPrice.Replace(" ", string.Empty));
            else
                requestInfo.RealCostPrice = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.RealCostBasisNo))
                requestInfo.RealCostBasisNo = PaymentUtil.AddComma(requestInfo.RealCostBasisNo.Replace(" ", string.Empty));
            else
                requestInfo.RealCostBasisNo = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.RealCostPriceYN))
                requestInfo.RealCostPriceYN = PaymentUtil.AddComma(requestInfo.RealCostPriceYN.Replace(" ", string.Empty));
            else
                requestInfo.RealCostPriceYN = PaymentUtil.AddComma("N");

            if (!string.IsNullOrEmpty(requestInfo.RealCostWhoFee))
                requestInfo.RealCostWhoFee = PaymentUtil.AddComma(requestInfo.RealCostWhoFee.Replace(" ", string.Empty));
            else
                requestInfo.RealCostWhoFee = PaymentUtil.AddComma(PaymentConstant.MainDelimiter);

            if (!string.IsNullOrEmpty(requestInfo.RealCostResult))
                requestInfo.RealCostResult = PaymentUtil.AddComma(requestInfo.RealCostResult.Replace(" ", string.Empty));
            else
                requestInfo.RealCostResult = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.Sid))
                requestInfo.Sid = PaymentUtil.AddComma(requestInfo.Sid.Replace(" ", string.Empty));
            else
                requestInfo.Sid = PaymentUtil.AddComma("0");

            // convert : 여기까지가 line 1610

            //if (!string.IsNullOrEmpty(paymentParam.AucNo))
            //    paymentParam.AucNo = PaymentUtil.AddComma(paymentParam.AucNo.Replace(" ", string.Empty));
            //else
            //    paymentParam.AucNo = PaymentUtil.AddComma("0");

            //if (string.IsNullOrEmpty(paymentParam.AuctionBidPrice)) { paymentParam.AuctionBidPrice = "0"; }
            //if (string.IsNullOrEmpty(paymentParam.AuctionBidAmt)) { paymentParam.AuctionBidAmt = "0"; }
            //if (string.IsNullOrEmpty(paymentParam.BidNo)) { paymentParam.BidNo = "0"; }

            // convert : 여기까지가 line 1633

            if (requestInfo.CardCash.ToUpper() == "GBANK_PAYPAL") { requestInfo.Gbank = requestInfo.GbankPaypal; }

            if (!string.IsNullOrEmpty(requestInfo.InventorySeqNo.Trim())) { requestInfo.InventorySeqNo = PaymentUtil.AddComma(requestInfo.InventorySeqNo.Trim()); }
            if (!string.IsNullOrEmpty(requestInfo.InventorySeqNoOpt.Trim())) { requestInfo.InventorySeqNoOpt = PaymentUtil.AddComma(requestInfo.InventorySeqNoOpt.Trim()); }

            if (!string.IsNullOrEmpty(requestInfo.RealDealerCostPrice))
                requestInfo.RealDealerCostPrice = PaymentUtil.AddComma(requestInfo.RealDealerCostPrice.Replace(" ", string.Empty));
            else
                requestInfo.RealDealerCostPrice = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.RealDealerCostBasisNo))
                requestInfo.RealDealerCostBasisNo = PaymentUtil.AddComma(requestInfo.RealDealerCostBasisNo.Replace(" ", string.Empty));
            else
                requestInfo.RealDealerCostBasisNo = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.CouponNo))
                requestInfo.CouponNo = PaymentUtil.AddComma(requestInfo.CouponNo.Replace(" ", string.Empty));
            else
                requestInfo.CouponNo = PaymentUtil.AddComma(PaymentConstant.MainDelimiter);

            if (!string.IsNullOrEmpty(requestInfo.ShoppingGuideNo))
                requestInfo.ShoppingGuideNo = PaymentUtil.AddComma(requestInfo.ShoppingGuideNo.Replace(" ", string.Empty));
            else
                requestInfo.ShoppingGuideNo = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.SplitSticker))
                requestInfo.SplitSticker = PaymentUtil.AddComma(requestInfo.SplitSticker.Replace(" ", string.Empty));
            else
                requestInfo.SplitSticker = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.SplitStickerWhoFee))
                requestInfo.SplitStickerWhoFee = PaymentUtil.AddComma(requestInfo.SplitStickerWhoFee.Replace(" ", string.Empty));
            else
                requestInfo.SplitStickerWhoFee = PaymentUtil.AddComma("TP");

            // 관심상품 주문
            if (!string.IsNullOrEmpty(requestInfo.InterestGroupNo))
                requestInfo.InterestGroupNo = PaymentUtil.AddComma(requestInfo.InterestGroupNo.Replace(" ", string.Empty));
            else
                requestInfo.InterestGroupNo = PaymentUtil.AddComma("0");

            // GIFT샵
            /*
            if (!string.IsNullOrEmpty(paymentParam.GiftPackYN))
                paymentParam.GiftPackYN = PaymentUtil.AddComma(paymentParam.GiftPackYN.Replace(" ", string.Empty));
            else
                paymentParam.GiftPackYN = PaymentUtil.AddComma("N");

            if (!string.IsNullOrEmpty(paymentParam.GiftShopYN))
                paymentParam.GiftShopYN = PaymentUtil.AddComma(paymentParam.GiftShopYN.Replace(" ", string.Empty));
            else
                paymentParam.GiftShopYN = PaymentUtil.AddComma("N");
            */

            if (!string.IsNullOrEmpty(requestInfo.SpecTransFee))
                requestInfo.SpecTransFee = PaymentUtil.AddComma(requestInfo.SpecTransFee.Replace(" ", string.Empty));
            else
                requestInfo.SpecTransFee = PaymentUtil.AddComma("0");

            // 단골찬스상품
            if (!string.IsNullOrEmpty(requestInfo.ChanceKind))
                requestInfo.ChanceKind = PaymentUtil.AddComma(requestInfo.ChanceKind.Replace(" ", string.Empty));
            else
                requestInfo.ChanceKind = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.ChanceAmount))
                requestInfo.ChanceAmount = PaymentUtil.AddComma(requestInfo.ChanceAmount.Replace(" ", string.Empty));
            else
                requestInfo.ChanceAmount = PaymentUtil.AddComma("0");

            // Plus Discount
            if (string.IsNullOrEmpty(requestInfo.PlusDisBdNos)) { requestInfo.PlusDisBdNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.PlusDisBcCondNos)) { requestInfo.PlusDisBcCondNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.PlusDisSatisCounts)) { requestInfo.PlusDisSatisCounts = PaymentUtil.AddComma("0"); }

            // Set Cost
            if (string.IsNullOrEmpty(requestInfo.SetCostNos)) { requestInfo.SetCostNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.SetCostScdNos)) { requestInfo.SetCostScdNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.SetCondScdNos)) { requestInfo.SetCondScdNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.SetCostSatisCounts)) { requestInfo.SetCostSatisCounts = PaymentUtil.AddComma("0"); }

            // Pack Cost
            if (string.IsNullOrEmpty(requestInfo.PackCostNos)) { requestInfo.PackCostNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.PackCostPcdNos)) { requestInfo.PackCostPcdNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.PackCondPcdNos)) { requestInfo.PackCondPcdNos = PaymentUtil.AddComma("0"); }
            if (string.IsNullOrEmpty(requestInfo.PackCostSatisCounts)) { requestInfo.PackCostSatisCounts = PaymentUtil.AddComma("0"); }

            // Global Link
            if (!string.IsNullOrEmpty(requestInfo.GlinkNation))
                requestInfo.GlinkNation = PaymentUtil.AddComma(requestInfo.GlinkNation);
            else
                requestInfo.GlinkNation = PaymentUtil.AddComma("KR");

            if (!string.IsNullOrEmpty(requestInfo.GlinkSellPrice))
                requestInfo.GlinkSellPrice = PaymentUtil.AddComma(requestInfo.GlinkSellPrice);
            else
                requestInfo.GlinkSellPrice = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.GlinkDelFee))
                requestInfo.GlinkDelFee = PaymentUtil.AddComma(requestInfo.GlinkDelFee);
            else
                requestInfo.GlinkDelFee = PaymentUtil.AddComma("0");

            if (!string.IsNullOrEmpty(requestInfo.GlinkAddInfo))
                requestInfo.GlinkAddInfo = PaymentUtil.AddComma(requestInfo.GlinkAddInfo);
            else
                requestInfo.GlinkAddInfo = PaymentUtil.AddComma("X");

            // 부가주문상품
            if (!string.IsNullOrEmpty(requestInfo.GdSelNo))
                requestInfo.GdSelNo = PaymentUtil.AddComma(requestInfo.GdSelNo);
            else
                requestInfo.GdSelNo = PaymentUtil.AddComma("0");

            // convert : 여기까지가 line 1814

            if (Array.IndexOf(new string[] { "G_LGCARD", "G_HDCARD", "G_SAMSUNG", "G_PLUS_SAMSUNG", "G_PLUS_LOTTE", "G_PLUS_SHINHAN", "G_PLUS_KEB" }, requestInfo.CardCash.ToUpper()) >= 0)
            {
                requestInfo.CardCash = "MPI";
            }

            requestInfo.OrderWayKind = "PAK";

            // convert : 여기까지가 line 1843

            // 현금영수증 자동발급 제한처리
            if (Array.IndexOf(new string[] { "CLUB_TICKET", "GCASH", "GMARKET_TOKEN", "EVENT_TOKEN" }, requestInfo.GoodsType.ToUpper()) < 0)
                requestInfo.CashReceiptYN = "Y";
            else
                requestInfo.CashReceiptYN = "N";

            // fix : [skip] 핸드폰 결제에 필요한 값이 안넘어왔을 경우는 튕겨냄
            // convert : 여기까지가 line 1874

            // 해외 카드 사용 가능 여부 체크
            if (requestInfo.CardCash.ToUpper() == "FOREIGN_CARD" && requestInfo.PayMethod.ToUpper() != "VISA-SSL" && requestInfo.PayMethod.ToUpper() != "ECMC-SSL" && requestInfo.PayMethod.ToUpper() != "FMPI")
            {
                string validThru = "20" + requestInfo.CardYear + requestInfo.CardMonth;

                OverseaCardCheckUsableT overseaCardCheckUsable = new PaymentBiz().GetOverseaCardCheckUsable(requestInfo.CardNumber, validThru, requestInfo.CustNo, requestInfo.TotalAuthMoney, FrontEncryption.CrpEncrypt(requestInfo.CardNumber));
                string retCode = overseaCardCheckUsable != null ? overseaCardCheckUsable.RetCode : string.Empty;

                if (retCode.ToUpper() != "OK")
                {
                    int errorCode;
                    string errorMessage;

                    switch (retCode)
                    {
                        case "NRC":
                            errorCode = -310;
                            errorMessage = "미등록 카드입니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        case "WFR":
                            errorCode = -311;
                            errorMessage = "등록 대기 카드입니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        case "OAR":
                            errorCode = -312;
                            errorMessage = "다른 사용자가 이미 등록한 카드입니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        case "IVT":
                            errorCode = -313;
                            errorMessage = "카드의 유효기간이 맞지 않습니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        case "BCL":
                            errorCode = -314;
                            errorMessage = "불량카드로 사용 제한된 카드입니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        case "ULO":
                            errorCode = -315;
                            errorMessage = "사용 한도가 초과된 카드입니다. 확인후 다시 주문해 주시기 바랍니다.";

                            break;
                        default:
                            errorCode = -316;
                            errorMessage = "카드가 올바르지 않습니다.";

                            break;
                    }

                    throw new PaymentProcessBizException(errorCode, errorMessage);
                }

            }

            // unavailable AMEX
            if (requestInfo.CardCash.ToUpper() == "FOREIGN_CARD")
            {
                if (requestInfo.CardNumber.Substring(0, 2) == "34" || requestInfo.CardNumber.Substring(0, 2) == "37")
                {
                    throw new PaymentProcessBizException(-373, "AMEX 카드는 서비스 중단으로 사용 불가 합니다. 다른 카드를 등록 하여 주십시오.");
                }
            }

            // convert : 여기까지가 line 1926

            // Settle Limit for Oversea PG
            if (requestInfo.AcntType.ToUpper() == "I1" || requestInfo.AcntType.ToUpper() == "I2" || (requestInfo.CardCash.ToUpper() == "MPI" && requestInfo.PayMethod.ToUpper() == "FMPI"))
            {

                string limitSettleNm;
                int limitChkSeqNo;
                DateTime limitChkDt1, limitChkDt2;
                //string limitChkRsltMsg0, sLimitChkRsltMsg1, sLimitChkRsltMsg2;
                string acntWayTemp;

                limitChkDt1 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
                limitChkDt2 = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-01 00:00:00"));
                limitChkSeqNo = requestInfo.BibitNo;
                limitSettleNm = "[" + (requestInfo.PayMethod.Length >= 4 ? requestInfo.PayMethod.ToUpper().Substring(0, 4) : requestInfo.PayMethod.ToUpper().Substring(0, requestInfo.PayMethod.Length)) + "] ";

                if (requestInfo.AcntType.ToUpper() == "I1")
                {
                    limitChkSeqNo = Validate.IsNumeric(requestInfo.PaypalNo) ? Convert.ToInt32(requestInfo.PaypalNo) : 0;
                    limitSettleNm = "[Paypal] ";
                }

                if (requestInfo.CardCash.ToUpper() == "MPI" && requestInfo.CardCash.ToUpper() == "FMPI")
                {
                    acntWayTemp = "I3";
                    limitChkSeqNo = requestInfo.PayAuthSeq;
                }
                else
                {
                    acntWayTemp = requestInfo.AcntType;
                }

                LimitOrderSettlePolicyCheckT limitOrderSettlePolicyCheck = new PaymentBiz().GetLimitOrderSettlePolicyCheck(requestInfo.CustNo, acntWayTemp, requestInfo.SettleLimitKey, limitChkDt1, limitChkDt2, limitChkSeqNo);

                if (limitOrderSettlePolicyCheck != null)
                {
                    if (limitOrderSettlePolicyCheck.RetCode != 0)
                    {
                        throw new PaymentProcessBizException(-366, string.Format("한도가 초과되었습니다. 결제가 이루어지지 않았으니, 확인후 다시 주문해 주시기 바랍니다.{0}", limitOrderSettlePolicyCheck.RetCode));
                    }
                }

                /*
                If Not (gORs.EOF Or gORs.BOF) Then
                    sRetCode = gORs("ret_code")
                    sRetReason = gORs("ret_reason")

                    If sRetCode <> 0 Then
                        Call WriteErrorOrderInfo (CONST_GMKT_FRONT_ORDER_ORDER_ERROR_TXT, sLimitSettleNm & sRetReason & "("&sRetCode&")", "-366", "NT")
                        'Call rtnCodeHandle("REDIRECT", sMode, 366, "", "", "PaymentProcess.asp", "", sGoodsCode)

                        If sAcntType = "I1" Then
                            sLimitChkRsltMsg1 = CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_NOTICE1
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##0##","Paypal")
                            sLimitChkRsltMsg2 = CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_NOTICE2
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##0##","Paypal")
                        Else
                            sLimitChkRsltMsg1 = CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_NOTICE1
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##0##",CONST_GMKT_FRONT_ORDER_OVERSEA_ISSUED_CARD)
                            sLimitChkRsltMsg2 = CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_NOTICE2
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##0##",CONST_GMKT_FRONT_ORDER_OVERSEA_ISSUED_CARD)
                        End If

                        If Right(sRetCode,1) = "1" Then
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##1##",CONST_GMKT_FRONT_ORDER_DAILY)
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##1##",CONST_GMKT_FRONT_ORDER_DAILY)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                        ElseIf Right(sRetCode,1) = "2" Then
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##1##",CONST_GMKT_FRONT_ORDER_DAILY)
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##2##",CONST_GMKT_FRONT_ORDER_TIMES)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##1##",CONST_GMKT_FRONT_ORDER_DAILY)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##2##",CONST_GMKT_FRONT_ORDER_TIMES)
                        ElseIf Right(sRetCode,1) = "3" Then
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##1##",CONST_GMKT_FRONT_ORDER_MONTHLY)
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##1##",CONST_GMKT_FRONT_ORDER_MONTHLY)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                        ElseIf Right(sRetCode,1) = "4" Then
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##1##",CONST_GMKT_FRONT_ORDER_WEEKLY)
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##2##",CONST_GMKT_FRONT_ORDER_TIMES)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##1##",CONST_GMKT_FRONT_ORDER_WEEKLY)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##2##",CONST_GMKT_FRONT_ORDER_TIMES)
                        Else
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##1##","")
                            sLimitChkRsltMsg1 = Replace(sLimitChkRsltMsg1,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##1##","")
                            sLimitChkRsltMsg2 = Replace(sLimitChkRsltMsg2,"##2##",CONST_GMKT_FRONT_ORDER_LIMIT)
                        End If

                        sLimitChkRsltMsg0 = sLimitChkRsltMsg1 & "\n\n" & sLimitChkRsltMsg2
                        sLimitChkRsltMsg0 = sLimitChkRsltMsg0 & "\n\n" & CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_HELP
                        sLimitChkRsltMsg0 = sLimitChkRsltMsg0 & "\n\n" & CONST_GMKT_FRONT_ORDER_SETTLE_LIMIT_SORRY

                        Response.write("<script language='javascript'>"&VbCrLf)
                        Response.write("	alert('" & sLimitChkRsltMsg0 & " (" & sRetCode & ")');"&VbCrLf)
                        If sOrderWayKind = "PAK" And UCase(sInstByPass) <> "Y" Then
                            Response.write("	document.location.href='"&BASKET_ORDER_URL&"';")
                        Else
                            Response.write("	document.location.href='"&NEO_GOODS_DOMAIN_SERVER_URL&"neo_goods/goods.asp?goodscode="&Left(Trim(sGoodsCode),9)&"';")
                        End If
                        Response.write("</script>"&VbCrLf)
                        Response.End
                    Else
                        sRetCode = ""
                        sRetReason = ""
                    End If
                End If

                Set gORs = Nothing
                */
            }

            // convert : 여기까지가 line 2034

            requestInfo.OnlineTransportSid = 0;
            // fix : [skip] 온라인 택배 서비스
            // convert : 여기까지가 line 2105
            /*
            if (paymentParam.AcntType.ToUpper() == "A3" && paymentParam.CardCash == "TRANS")
            {
                if (string.IsNullOrEmpty(paymentParam.TransBankNo))
                {
                    paymentResult.Result.RetCode = -20;
                    paymentResult.Result.RetMessage = "주문 접수중에 문제가 발생했습니다. 주문에 실패하여 결제가 이루어지지 않았습니다. 확인후 다시 주문해 주시기 바랍니다.";

                    return paymentResult;
                }
            }
            */

            // convert : 여기까지가 line 2112
            //paymentParam.PrimaryCheckValue = "KOR";
            requestInfo.PrimaryCheckValue = "GEP";
            //paymentParam.FrCode = "90001";

            if (string.IsNullOrEmpty(requestInfo.OrderSiteInfo)) { requestInfo.OrderSiteInfo = "GEP"; }

            requestInfo.OrderSiteInfo = requestInfo.OrderSiteInfo.Replace("KOR", "GEP");

            if (requestInfo.Mode.ToUpper() == "BASKET_ORDER")
            {
                string[] arrOrderSite = requestInfo.OrderSiteInfo.Split(PaymentConstant.CommaSeperator);

                for (int idx = 0, orderSiteLength = arrOrderSite.Length; idx < orderSiteLength; idx++)
                {
                    if (idx == 0) { requestInfo.PrimaryCheckValue = arrOrderSite[idx]; }

                    if (requestInfo.PrimaryCheckValue != arrOrderSite[idx])
                    {
                        requestInfo.PrimaryCheckValue = "GEP";
                        break;
                    }
                }
            }
            else
            {
                requestInfo.PrimaryCheckValue = requestInfo.OrderSiteInfo;
            }

            // convert : 여기까지가 line 2146

            if (!requestInfo.GoodsType.EndsWith(",")) { requestInfo.GoodsType = PaymentUtil.AddComma(requestInfo.GoodsType.Trim()); }

            // OuterOrderNos가 곧 gep_order_no 다.
            if (string.IsNullOrEmpty(requestInfo.OuterOrderNos))
            {
                throw new PaymentProcessBizException(-374, " GEP 주문번호가 올바르지 않습니다. 확인후 다시 주문해 주시기 바랍니다.");
            }
            else
            {
                string[] arrGoodsCode = requestInfo.ItemNo.EndsWith(",") ? requestInfo.ItemNo.Split(PaymentConstant.CommaSeperator) : (requestInfo.ItemNo + ",").Split(PaymentConstant.CommaSeperator);
                string[] arrOuterOrderNo = requestInfo.OuterOrderNos.EndsWith(",") ? requestInfo.OuterOrderNos.Split(PaymentConstant.CommaSeperator) : (requestInfo.OuterOrderNos + ",").Split(PaymentConstant.CommaSeperator);

                if (arrGoodsCode.Length != arrOuterOrderNo.Length)
                {
                    throw new PaymentProcessBizException(-375, "GEP 주문번호가 올바르지 않습니다. 확인후 다시 주문해 주시기 바랍니다.");
                }
            }

            /*
            if (string.IsNullOrEmpty(requestInfo.OuterOrderNos) && requestInfo.Mode.ToUpper() == "BASKET_ORDER")
            {
                string[] arrGoodsCode = requestInfo.ItemNo.EndsWith(",") ? requestInfo.ItemNo.Split(PaymentConstant.CommaSeperator) : (requestInfo.ItemNo + ",").Split(PaymentConstant.CommaSeperator);

                for (int idx = 0, goodsCodeLength = arrGoodsCode.Length; idx < goodsCodeLength; idx++)
                {
                    requestInfo.OuterOrderNos = PaymentUtil.AddComma(requestInfo.OuterOrderNos);
                }
            }
            */

            if (!requestInfo.OuterOrderNos.EndsWith(",")) { requestInfo.OuterOrderNos = PaymentUtil.AddComma(requestInfo.OuterOrderNos.Trim()); }
            requestInfo.OuterOrderNos = requestInfo.OuterOrderNos.Trim().Replace("NaN", string.Empty);

            // convert : 여기까지가 line 2164

            // fix : [skip] 주문전 선택옵션 재고 품절 여부 및 데이터 변조 여부 체크
            // convert : 여기까지가 line 2185
            requestInfo.PaymentOrderType = "DM";

            return requestInfo;
        }
예제 #10
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
        }
예제 #11
0
        public void SetOrderReservedDiscount(string pid)
        {
            PaymentBiz biz = new PaymentBiz();
            List<OrderReservedDiscountInfoT> orderReservedDiscountInfoList = this.GetOrderReservedDiscountInfo(pid);

            if (orderReservedDiscountInfoList != null && orderReservedDiscountInfoList.Count > 0)
            {
                foreach (OrderReservedDiscountInfoT orderReservedDiscountInfo in orderReservedDiscountInfoList)
                {
                    biz.SetReservedDiscountDecrease(orderReservedDiscountInfo.CostBasisNo, orderReservedDiscountInfo.OrderCnt);
                }
            }
        }
예제 #12
0
        public int InsertGEPPaymentPolicyItemInfo(List<PaymentInsertPolicyItemInfoT> list)
        {
            int count = 0;

            PaymentBiz biz = new PaymentBiz();

            foreach (PaymentInsertPolicyItemInfoT item in list)
            {
                try
                {
                    item.ItemRowNo = count;

                    biz.InsertGEPPaymentPolicyItemInfo(item);

                    count++;
                }
                catch (Exception ex)
                {
                    throw new PaymentBizException("주문 정보 입력 도중 오류가 발생하였습니다.", ex);
                }
            }

            return count;
        }