Пример #1
0
        public PaymentPayMethodInfo(PaymentRequestInfoT paymentRequestInfo)
            : this()
        {
            this.orcVirtualCardKind[0] = paymentRequestInfo.VirtualCardKind1;
            this.orcVirtualCardKind[1] = paymentRequestInfo.VirtualCardKind2;
            this.orcVirtualCardKind[2] = paymentRequestInfo.VirtualCardKind3;
            this.orcVirtualCardKind[3] = paymentRequestInfo.VirtualCardKind4;
            this.orcVirtualCardKind[4] = paymentRequestInfo.VirtualCardKind5;

            this.orcCustNo = paymentRequestInfo.CustNo;
            this.orcJaehuId = string.Empty;
            //this.orcOrderType = "DOMESTIC";
            this.orcCardCash = paymentRequestInfo.CardCash;
            this.orcPaymentNm = paymentRequestInfo.PaymentName;

            this.orcPaymethod = paymentRequestInfo.PaymentMethod;
            this.orcHalbuType = paymentRequestInfo.HalbuType;
            this.orcInstallmonth = paymentRequestInfo.Installmonth;
            this.orcISPInstallmonth = Validate.IsNumeric(paymentRequestInfo.IspInstallmonth) ? Convert.ToInt32(paymentRequestInfo.IspInstallmonth) : 0;
            this.orcMPIInstallmonth = Validate.IsNumeric(paymentRequestInfo.MpiInstallmonth) ? Convert.ToInt32(paymentRequestInfo.MpiInstallmonth) : 0;

            this.orcCardNumber = paymentRequestInfo.CardNumber;
            this.orcCardYear = paymentRequestInfo.CardYear;
            this.orcCardMonth = paymentRequestInfo.CardMonth;
            this.orcCardExpYear = paymentRequestInfo.CcExpYear;
            this.orcCardExpMonth = paymentRequestInfo.CcExpMonth;
            this.orcCardPwd = paymentRequestInfo.CardPwd;
            this.orcSocialNo2 = paymentRequestInfo.SocialNo2;

            this.orcXid = paymentRequestInfo.Xid;
            this.orcEci = paymentRequestInfo.Eci;
            this.orcCavv = paymentRequestInfo.Cavv;
            this.orcKVPSessionkey = paymentRequestInfo.KvpSessionkey;
            this.orcKVPEncdata = paymentRequestInfo.KvpEncdata;
            this.orcKVPCardCode = paymentRequestInfo.KvpCardcode;
            this.orcSaveFlag = paymentRequestInfo.SaveFlag;

            this.orcTransCardCash = string.Empty;// paymentRequestInfo.TransCardCash.ToUpper();

            this.orcGdNo = paymentRequestInfo.ItemNo;
            this.orcPid = paymentRequestInfo.BasketPid;
            this.orcGdSelNos = paymentRequestInfo.GdSelNo;

            this.orcIsSaveJaehuType = GetSaveJaehuType(paymentRequestInfo.PaymentName);
        }
Пример #2
0
        private string GetParam(PaymentRequestInfoT paymentRequestInfo, string errorSource, int errorCode, string errorMessage, string errorWhere)
        {
            string referer = string.Empty;
            Dictionary<string, string> param = new Dictionary<string,string>();

            if (HttpContext.Current != null)
            {
                if (HttpContext.Current.Request.UrlReferrer != null)
                    referer = HttpContext.Current.Request.UrlReferrer.ToString();
                else
                    referer = HttpContext.Current.Request.Url.ToString();
            }

            param.Add("order_type", paymentRequestInfo.OrderType);
            param.Add("cust_no", paymentRequestInfo.CustNo);
            param.Add("gd_no_s", paymentRequestInfo.ItemNo);
            param.Add("trad_way_s", paymentRequestInfo.TradWay);
            param.Add("card_cash", paymentRequestInfo.CardCash);
            param.Add("acnt_type", paymentRequestInfo.AcntType);
            param.Add("order_price_s", paymentRequestInfo.OrderPrice);
            param.Add("order_cnts_s", paymentRequestInfo.OrderCounts);
            param.Add("isRcvMail", paymentRequestInfo.IsRcvMail);
            param.Add("isRcvSMS", paymentRequestInfo.IsRcvSMS);
            param.Add("jaehuids", paymentRequestInfo.JaehuID);
            param.Add("Additional_infos", HttpUtility.UrlEncode(paymentRequestInfo.SelInfo));
            param.Add("del_memo_s", HttpUtility.UrlEncode(paymentRequestInfo.DelMemo, Encoding.GetEncoding("euc-kr")));
            param.Add("order_way_kind", paymentRequestInfo.OrderWayKind);
            param.Add("pos_shop_cd_s", paymentRequestInfo.PosShopCd);
            param.Add("pos_class_cd_s", paymentRequestInfo.PosClassKind);
            param.Add("pos_class_kind_s", paymentRequestInfo.PosClassKind);
            param.Add("member_type", paymentRequestInfo.MemberType);
            param.Add("delivery_fee_s", paymentRequestInfo.DeliveryFee);
            param.Add("delivery_group_no_s", paymentRequestInfo.DeliveryGroupNo);
            param.Add("cost_price_s", paymentRequestInfo.RealCostPrice);
            param.Add("cost_basis_no_s", paymentRequestInfo.RealCostBasisNo);
            param.Add("sid_s", paymentRequestInfo.Sid);
            param.Add("sel_item_price_s", paymentRequestInfo.SelItemPrice);
            param.Add("auction_no", "0");
            param.Add("bid_price", paymentRequestInfo.AuctionBidPrice);
            param.Add("bid_amt", paymentRequestInfo.AuctionBidAmt);
            param.Add("div_succ_bid_yn", "N");
            param.Add("login_id", paymentRequestInfo.LoginID);
            param.Add("seller_cust_no", paymentRequestInfo.SellerCustNo);
            param.Add("bid_no", paymentRequestInfo.BidNo);
            param.Add("inventory_seq_no_s", paymentRequestInfo.InventorySeqNo);
            param.Add("oncredit_yn", paymentRequestInfo.OncreditYN);
            param.Add("dealer_cost_price_s", paymentRequestInfo.RealDealerCostPrice);
            param.Add("dealer_cost_basis_no_s", paymentRequestInfo.RealDealerCostBasisNo);
            param.Add("coupon_eid_s", string.Empty);	// fix : 받지 않는데 더 찾아볼것
            param.Add("shopping_guide_no_s", paymentRequestInfo.ShoppingGuideNo);
            param.Add("coupon_no_s", paymentRequestInfo.CouponNo);
            param.Add("reservation_rsv_no", paymentRequestInfo.ReservationRsvNo.ToString());
            param.Add("sticker_cnt_s", paymentRequestInfo.SplitSticker);
            param.Add("sticker_whofee_s", paymentRequestInfo.SplitStickerWhoFee);
            param.Add("remote_ip", paymentRequestInfo.RemoteAddress);
            param.Add("gbank_gubun", paymentRequestInfo.GbankGubun);
            param.Add("jehu_gd_nos", paymentRequestInfo.Jehugoodscode);
            param.Add("jehu_order_cnts", paymentRequestInfo.Jehuordercnts);
            param.Add("jehu_order_no", paymentRequestInfo.Jehuorderno);
            param.Add("jehu_l_type", paymentRequestInfo.Jehuorderltype);
            param.Add("jehu_a_type", paymentRequestInfo.Jehuorderatype);
            param.Add("sttl_code", paymentRequestInfo.PaymentCode);
            param.Add("foreign_money", paymentRequestInfo.ForeignMoney.ToString());
            param.Add("OvsTrnscoCode", "1");
            param.Add("hidBranchInfo", paymentRequestInfo.HidBranchInfo);
            param.Add("interest_group_no_s", paymentRequestInfo.InterestGroupNo);
            param.Add("gift_pack_yn_s", paymentRequestInfo.GiftPackYN);
            param.Add("gift_shop_yn_s", paymentRequestInfo.GiftShopYN);
            param.Add("gift_spec_trans_fee_s", paymentRequestInfo.SpecTransFee);
            param.Add("gift_spec_trans_day_s", string.Empty);
            param.Add("g_jaehuid", paymentRequestInfo.CurrentJaehuID);
            param.Add("policy_no_s", paymentRequestInfo.PolicyNo);
            param.Add("bundle_cond_no", paymentRequestInfo.PlusDisBcCondNos);
            param.Add("etc_01",  string.Empty);
            param.Add("etc_02", paymentRequestInfo.Vaccount.Length > 3 ? paymentRequestInfo.Vaccount.Substring(0, paymentRequestInfo.Vaccount.Length - 3 ) + "***" : paymentRequestInfo.Vaccount);

            param.Add("etc_03", errorWhere);
            param.Add("etc_04", string.Format("{0}({1}|{2}|{3}|{4}|{5})", paymentRequestInfo.VirtualCardKind, paymentRequestInfo.VirtualCardKind1, paymentRequestInfo.VirtualCardKind2, paymentRequestInfo.VirtualCardKind3, paymentRequestInfo.VirtualCardKind4, paymentRequestInfo.VirtualCardKind5));
            param.Add("etc_05", paymentRequestInfo.ServerIPAddress);
            param.Add("etc_06", System.Net.Dns.GetHostName());
            param.Add("etc_07", string.Empty );	// fix : sOkCashBagTradeSeqNos
            param.Add("etc_08", string.Empty);
            param.Add("etc_09", string.Empty);
            param.Add("etc_10", string.Empty);
            param.Add("buyer_name", HttpUtility.UrlEncode(paymentRequestInfo.BuyerName, Encoding.GetEncoding("euc-kr")));
            param.Add("buyer_tel_no", paymentRequestInfo.BuyerTelNo);
            param.Add("buyer_email", paymentRequestInfo.BuyerEmail);
            param.Add("receive_mail_yn", paymentRequestInfo.ReceiveMailYn);
            param.Add("ErrCategory", HttpUtility.UrlEncode(errorSource, Encoding.GetEncoding("euc-kr")));
            param.Add("ErrDescription", HttpUtility.UrlEncode(errorMessage, Encoding.GetEncoding("euc-kr")));
            param.Add("ErrCode", errorCode.ToString());
            param.Add("ErrNowDate", HttpUtility.UrlEncode(DateTime.Now.ToString("yyyy-MM-dd hh:mm:ss")));
            param.Add("ErrRemoteIP", paymentRequestInfo.RemoteAddress);
            param.Add("ErrPrevPage", HttpUtility.UrlEncode(referer, Encoding.GetEncoding("euc-kr")));
            param.Add("ErrUserAgent", HttpUtility.UrlEncode(GetBrowserInfo()));

            return string.Join("&", (from x in param select x.Key + "=" + x.Value).ToArray());
        }
Пример #3
0
        public void SendPaymentError(PaymentRequestInfoT paymentRequestInfo, string errorSource, int errorCode, string errorMessage, string errorWhere)
        {
            string param = GetParam(paymentRequestInfo, errorSource, errorCode, errorMessage, errorWhere);

            SendError(param);
        }
Пример #4
0
        public PaymentOrderItemT SetPaymentOrderItem(PaymentRequestInfoT orgPaymentRequestInfo, PaymentRequestInfoT paymentRequestInfo)
        {
            PaymentBiz paymentBiz = new PaymentBiz();
            PaymentOrderItemT paymentOrderItem = new PaymentOrderItemT();

            string paymentGoodsCode, paymentAmount, paymentPrice;
            string paymentGdSelNo, paymentBasketPID, paymentOrderIdx;
            string paymentSelItemPrice, paymentDeliveryFee, paymentCostPrice;
            string paymentDeliveryGroupNo;

            string plGdNo = string.Empty, plOrderCnt = string.Empty, plOrderPrice = string.Empty, plGdNm = string.Empty, plGdEngNm = string.Empty, plGdKind = string.Empty, plGdOrigin = string.Empty, plGdOrigin2 = string.Empty, plGdlcCd = string.Empty, plGdmcCd = string.Empty, plGdscCd = string.Empty, plMakerNm = string.Empty;
            string plBrandNm = string.Empty, plDealPriceKind = string.Empty, plDealPrice = string.Empty, plOpGd = string.Empty, plAsYn = string.Empty, plSellCustNo = string.Empty, plGdShopkind = string.Empty, plGdShopkind2 = string.Empty, plGdShopkind3 = string.Empty, plTradWay = string.Empty;
            string plTemplateType = string.Empty, plAdultYn = string.Empty, plHasaddedfile = string.Empty, plInventoryNo = string.Empty, plInventorytype = string.Empty, plOptInventoryno = string.Empty, plOptInventorytype = string.Empty, plGdMadeSdt = string.Empty;
            string plAttribEndDt = string.Empty, plGdBuyerMlRate = string.Empty, plGdBuddyMlRate = string.Empty, plUseGubun = string.Empty, plBundleType = string.Empty, plDangolChanceAmt = string.Empty, plDangolChanceKind = string.Empty;
            string plDntNo = string.Empty, plDntWhoFee = string.Empty, plDntSaveMoney = string.Empty, plMaxLimit = string.Empty, plTotalSaveMoney = string.Empty, plFreecSellerchargeyn = string.Empty, plJehuRsvServiceType = string.Empty;
            string plJehuEstType = string.Empty, plGoodsRegDt = string.Empty, plDeliveryGroupNo = string.Empty, plDeliveryFee = string.Empty, plBuyUnitCnt = string.Empty, plMinBuyCnt = string.Empty, plTemplateUrl = string.Empty;
            string plShopGroupCd = string.Empty, plShopGdlcCd = string.Empty, plShopGdmcCd = string.Empty, plShopGdscCd = string.Empty;

            string paramXml = string.Empty;
            //string xmlParams, xmlValues;

            //string paymentOrderType;

            paymentBasketPID = orgPaymentRequestInfo.BasketPid;

            paymentOrderIdx = orgPaymentRequestInfo.SelectedOrderIdxs.Replace(" ", string.Empty).Replace("|",",");
            paymentGdSelNo = PaymentUtil.AddComma(orgPaymentRequestInfo.GdSelNo).Replace(" ", string.Empty);
            paymentGoodsCode = PaymentUtil.AddComma(orgPaymentRequestInfo.ItemNo).Replace(" ", string.Empty);
            paymentAmount = PaymentUtil.AddComma(orgPaymentRequestInfo.OrderCounts).Replace(" ", string.Empty);
            paymentPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.OrderPrice).Replace(" ", string.Empty);
            paymentSelItemPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.SelItemPrice).Replace(" ", string.Empty);
            paymentDeliveryFee = PaymentUtil.AddComma(orgPaymentRequestInfo.DeliveryFee).Replace(" ", string.Empty);
            paymentCostPrice = PaymentUtil.AddComma(orgPaymentRequestInfo.RealCostPrice).Replace(" ", string.Empty);
            paymentDeliveryGroupNo = PaymentUtil.AddComma(orgPaymentRequestInfo.DeliveryGroupNo).Replace(" ", string.Empty);

            if (string.IsNullOrEmpty(paymentBasketPID))
                paymentBasketPID = Guid.NewGuid().ToString();

            if (string.IsNullOrEmpty(paymentGdSelNo))
            {
                paymentGdSelNo = orgPaymentRequestInfo.RemoteAddress.Replace(".", string.Empty) + DateTime.Now.Day.ToString().PadRight(2, '0') + DateTime.Now.Hour.ToString().PadRight(2, '0') + DateTime.Now.Minute.ToString().PadRight(2, '0') + DateTime.Now.Second.ToString().PadRight(2, '0');
            }

            if (string.IsNullOrEmpty(paymentOrderIdx))
            {
                string[] icntArr = paymentGoodsCode.Split(PaymentConstant.CommaSeperator);

                for (int iloopCnt = 0, icntArrLength = icntArr.Length; iloopCnt < icntArrLength; iloopCnt++)
                {
                    PaymentOrderIndexT paymentOrderIndex = paymentBiz.GetPaymentOrderIndex();
                    if (paymentOrderIndex != null)
                    {
                        paymentOrderIdx = PaymentUtil.AddComma(paymentOrderIdx + paymentOrderIndex.OrderIdx.ToString());
                    }
                }
            }

            if (!paymentOrderIdx.Trim().EndsWith(PaymentConstant.Comma)) { paymentOrderIdx = PaymentUtil.AddComma(paymentOrderIdx); }
            if (!paymentGdSelNo.Trim().EndsWith(PaymentConstant.Comma)) { paymentGdSelNo = PaymentUtil.AddComma(paymentGdSelNo); }
            if (!paymentGoodsCode.Trim().EndsWith(PaymentConstant.Comma)) { paymentGoodsCode = PaymentUtil.AddComma(paymentGoodsCode); }
            if (!paymentAmount.Trim().EndsWith(PaymentConstant.Comma)) { paymentAmount = PaymentUtil.AddComma(paymentAmount); }
            if (!paymentPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentPrice = PaymentUtil.AddComma(paymentPrice); }
            if (!paymentSelItemPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentSelItemPrice = PaymentUtil.AddComma(paymentSelItemPrice); }
            if (!paymentDeliveryFee.Trim().EndsWith(PaymentConstant.Comma)) { paymentDeliveryFee = PaymentUtil.AddComma(paymentDeliveryFee); }
            if (!paymentCostPrice.Trim().EndsWith(PaymentConstant.Comma)) { paymentCostPrice = PaymentUtil.AddComma(paymentCostPrice); }
            if (!paymentDeliveryGroupNo.Trim().EndsWith(PaymentConstant.Comma)) { paymentDeliveryGroupNo = PaymentUtil.AddComma(paymentDeliveryGroupNo); }

            //paymentOrderType = "DM";

            //XQueryUtil xQueryUtil = new XQueryUtil();

            //xmlParams = "gd_no,order_cnt,order_price,";
            //xmlValues = xQueryUtil.ParamCheckComma(strPaymentGoodsCode) + PaymentConstant.MainDelimiter +
            //    xQueryUtil.ParamCheckComma(strPaymentAmount) + PaymentConstant.MainDelimiter +
            //    xQueryUtil.ParamCheckComma(strPaymentPrice);

            //isRtnValue = xQueryUtil.BuildXQueryXml(xmlParams, xmlValues, 0);

            //if (isRtnValue)
            //{
            //    paramXml = xQueryUtil.GetParamXml();
            //}

            paramXml = MakeXQuery(new List<string> { "gd_no", "order_cnt", "order_price" },
                new List<string> { paymentGoodsCode, paymentAmount, paymentPrice }
                );

            //string[] arrPaymentDeliveryGroupNo = strPaymentDeliveryGroupNo.Split(PaymentConstant.CommaSeperator);
            //string[] arrPaymentDeliveryFee = strPaymentDeliveryFee.Split(PaymentConstant.CommaSeperator);

            //int packNo = 0;
            //List<PaymentInsertPolicyItemInfoT> policyItemInfoList = new List<PaymentInsertPolicyItemInfoT>();
            List<PaymentItemInfoPolicyT> paymentItemInfoPolicy = paymentBiz.GetPaymentItemInfoPolicy(paymentBasketPID, paramXml);

            if (paymentItemInfoPolicy != null)
            {
                if (paymentItemInfoPolicy.Count > 0)
                {
                    //packNo = paymentBiz.GetNewPackNo();

                    Dictionary<string, KeyValuePair<int, string[]>> dicPolicyItemInfoParam = GetPolicyItemInfoParam(paymentItemInfoPolicy.Count
                        , paymentGdSelNo, paymentOrderIdx, paymentPrice, paymentDeliveryFee, paymentCostPrice, paymentDeliveryGroupNo);

                    for (int i = 0, paymentItemInfoPolicyLength = paymentItemInfoPolicy.Count; i < paymentItemInfoPolicyLength; i++)
                    {
                        /*
                        policyItemInfoList.Add(new PaymentInsertPolicyItemInfoT()
                        {
                            PackNo = packNo,
                            Pid = paymentBasketPID,
                            ItemNo = paymentItemInfoPolicy[i].ItemNo.Trim(),
                            GdSelNo = dicPolicyItemInfoParam["GdSelNo"].Value[i],
                            OrderIdx = Util.GetSafeLong(dicPolicyItemInfoParam["OrderIdx"].Value[i]),
                            ItemName = Util.StripHtmlTags(paymentItemInfoPolicy[i].ItemName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdEngNm = Util.StripHtmlTags(paymentItemInfoPolicy[i].GdEngNm).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdKind = paymentItemInfoPolicy[i].GdKind,
                            GdOrigin = Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            GdlcCd = paymentItemInfoPolicy[i].GdlcCd.Trim(),
                            GdmcCd = paymentItemInfoPolicy[i].GdmcCd.Trim(),
                            GdscCd = paymentItemInfoPolicy[i].GdscCd.Trim(),
                            MakerName = Util.StripHtmlTags(paymentItemInfoPolicy[i].MakerName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            BrandName = Util.StripHtmlTags(paymentItemInfoPolicy[i].BrandName).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            DealPriceKind = paymentItemInfoPolicy[i].DealPriceKind.Trim(),
                            DealPrice = paymentItemInfoPolicy[i].DealPrice,
                            OpGd = Util.StripHtmlTags(paymentItemInfoPolicy[i].OpGd).Replace(",", ".").Replace("'", "`").Replace(",", "."),
                            AsYn = paymentItemInfoPolicy[i].AsYn.Trim(),
                            SellCustNo = paymentItemInfoPolicy[i].SellCustNo.Trim(),
                            GdShopkind = paymentItemInfoPolicy[i].GdShopkind.Trim(),
                            GdShopkind2 = paymentItemInfoPolicy[i].GdShopkind2.Trim(),
                            GdShopkind3 = paymentItemInfoPolicy[i].GdShopkind3.Trim(),
                            TradWay = paymentItemInfoPolicy[i].TradWay.Trim(),
                            TemplateType = paymentItemInfoPolicy[i].TemplateType.Trim(),
                            AdultYn = paymentItemInfoPolicy[i].AdultYn.Trim(),
                            Hasaddedfile = paymentItemInfoPolicy[i].Hasaddedfile.Trim(),
                            InventoryNo = paymentItemInfoPolicy[i].InventoryNo.Trim(),
                            Inventorytype = paymentItemInfoPolicy[i].Inventorytype.Trim(),
                            OptInventoryno = paymentItemInfoPolicy[i].OptInventoryno.Trim(),
                            OptInventorytype = paymentItemInfoPolicy[i].OptInventorytype.Trim(),
                            GdMadeSdt = Convert.ToDateTime(paymentItemInfoPolicy[i].GdMadeSdt),
                            AttribEndDt = Convert.ToDateTime(paymentItemInfoPolicy[i].AttribEndDt),
                            GdBuyerMlRate = paymentItemInfoPolicy[i].GdBuyerMlRate,
                            GdBuddyMlRate = paymentItemInfoPolicy[i].GdBuddyMlRate,
                            UseGubun = paymentItemInfoPolicy[i].UseGubun.Trim(),
                            BundleType = paymentItemInfoPolicy[i].BundleType.Trim(),
                            MinBuyCnt = paymentItemInfoPolicy[i].BuyUnitCnt,
                            BuyUnitCnt = paymentItemInfoPolicy[i].MinBuyCnt,
                            DangolChanceAmt = paymentItemInfoPolicy[i].DangolChanceAmt,
                            DangolChanceKind = paymentItemInfoPolicy[i].DangolChanceKind.Trim(),
                            JehuRsvServiceType = paymentItemInfoPolicy[i].JehuRsvServiceType.Trim(),
                            JehuEstType = paymentItemInfoPolicy[i].JehuEstType.Trim(),
                            DntNo = paymentItemInfoPolicy[i].DntNo,
                            DntWhoFee = paymentItemInfoPolicy[i].DntWhoFee.Trim(),
                            DntSaveMoney = paymentItemInfoPolicy[i].DntSaveMoney,
                            FreecSellerchargeyn = paymentItemInfoPolicy[i].FreecSellerchargeyn.Trim(),
                            OrderPrice = paymentItemInfoPolicy[i].OrderPrice,
                            SelItemPrice = Util.GetSafeDecimal(dicPolicyItemInfoParam["SelItemPrice"].Value[i]),
                            OrderCnt = paymentItemInfoPolicy[i].OrderCnt,
                            DelFee = Util.GetSafeDecimal(dicPolicyItemInfoParam["DelFee"].Value[i]),
                            CostPrice = Util.GetSafeDecimal(dicPolicyItemInfoParam["CostPrice"].Value[i]),
                            DeliveryGroupNo = Util.GetSafeInt(dicPolicyItemInfoParam["DeliveryGroupNo"].Value[i]),
                            ShopGroupCd = paymentItemInfoPolicy[i].ShopGroupCd,
                            ShopGdlcCd = paymentItemInfoPolicy[i].ShopGdlcCd,
                            ShopGdmcCd = paymentItemInfoPolicy[i].ShopGdmcCd,
                            ShopGdscCd = paymentItemInfoPolicy[i].ShopGdscCd
                        });
                        */

                        plGdNo = plGdNo + PaymentUtil.AddComma(paymentItemInfoPolicy[i].ItemNo.Trim());
                        plOrderCnt = plOrderCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OrderCnt.ToString());
                        plOrderPrice = plOrderPrice + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OrderPrice.ToString());
                        plGdNm = plGdNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].ItemName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdEngNm = plGdEngNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdEngNm).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdKind = plGdKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdKind.ToString().Trim());
                        plGdOrigin = plGdOrigin + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdOrigin2 = plGdOrigin2 + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].GdOrigin2).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plGdlcCd = plGdlcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdlcCd.Trim());
                        plGdmcCd = plGdmcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdmcCd.Trim());
                        plGdscCd = plGdscCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdscCd.Trim());
                        plMakerNm = plMakerNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].MakerName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plBrandNm = plBrandNm + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].BrandName).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plDealPriceKind = plDealPriceKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DealPriceKind.Trim());
                        plDealPrice = plDealPrice + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DealPrice.ToString());
                        plOpGd = plOpGd + PaymentUtil.AddComma( Util.StripHtmlTags(paymentItemInfoPolicy[i].OpGd).Replace(",", ".").Replace("'", "`").Replace(",", "."));
                        plAsYn = plAsYn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AsYn.Trim());
                        plSellCustNo = plSellCustNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].SellCustNo.Trim());
                        plGdShopkind = plGdShopkind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind.Trim());
                        plGdShopkind2 = plGdShopkind2 + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind2.Trim());
                        plGdShopkind3 = plGdShopkind3 + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdShopkind3.Trim());
                        plTradWay = plTradWay + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TradWay.Trim());
                        plTemplateType = plTemplateType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TemplateType.Trim());
                        plAdultYn = plAdultYn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AdultYn.Trim());
                        plHasaddedfile = plHasaddedfile + PaymentUtil.AddComma( paymentItemInfoPolicy[i].Hasaddedfile.Trim());
                        plInventoryNo = plInventoryNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].InventoryNo.Trim());
                        plInventorytype = plInventorytype + PaymentUtil.AddComma( paymentItemInfoPolicy[i].Inventorytype.Trim());
                        plOptInventoryno = plOptInventoryno + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OptInventoryno.Trim());
                        plOptInventorytype = plOptInventorytype + PaymentUtil.AddComma( paymentItemInfoPolicy[i].OptInventorytype.Trim());
                        plGdMadeSdt = plGdMadeSdt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdMadeSdt.Trim());
                        plAttribEndDt = plAttribEndDt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].AttribEndDt.Trim());
                        plGdBuyerMlRate = plGdBuyerMlRate + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdBuyerMlRate.ToString());
                        plGdBuddyMlRate = plGdBuddyMlRate + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GdBuddyMlRate.ToString());
                        plUseGubun = plUseGubun + PaymentUtil.AddComma( paymentItemInfoPolicy[i].UseGubun.Trim());
                        plBundleType = plBundleType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].BundleType.Trim());
                        plDangolChanceAmt = plDangolChanceAmt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DangolChanceAmt.ToString());
                        plDangolChanceKind = plDangolChanceKind + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DangolChanceKind.Trim());
                        plDntNo = plDntNo + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntNo.ToString());
                        plDntWhoFee = plDntWhoFee + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntWhoFee.Trim());
                        plDntSaveMoney = plDntSaveMoney + PaymentUtil.AddComma( paymentItemInfoPolicy[i].DntSaveMoney.ToString());
                        plMaxLimit = plMaxLimit + PaymentUtil.AddComma( paymentItemInfoPolicy[i].MaxLimit.ToString());
                        plTotalSaveMoney = plTotalSaveMoney + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TotalSaveMoney.ToString());
                        plFreecSellerchargeyn = plFreecSellerchargeyn + PaymentUtil.AddComma( paymentItemInfoPolicy[i].FreecSellerchargeyn.Trim());
                        plJehuRsvServiceType = plJehuRsvServiceType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].JehuRsvServiceType.Trim());
                        plJehuEstType = plJehuEstType + PaymentUtil.AddComma( paymentItemInfoPolicy[i].JehuEstType.Trim());
                        plGoodsRegDt = plGoodsRegDt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].GoodsRegDt.Trim());
                        plBuyUnitCnt = plBuyUnitCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].BuyUnitCnt.ToString());
                        plMinBuyCnt = plMinBuyCnt + PaymentUtil.AddComma( paymentItemInfoPolicy[i].MinBuyCnt.ToString());
                        plTemplateUrl = plTemplateUrl + PaymentUtil.AddComma( paymentItemInfoPolicy[i].TemplateUrl.Trim());
                        plShopGroupCd = plShopGroupCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGroupCd.ToString());
                        plShopGdlcCd = plShopGdlcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGdlcCd.ToString());
                        plShopGdmcCd = plShopGdmcCd + PaymentUtil.AddComma( paymentItemInfoPolicy[i].ShopGdmcCd.ToString());
                        plShopGdscCd = plShopGdscCd + PaymentUtil.AddComma(paymentItemInfoPolicy[i].ShopGdscCd.ToString());

                    }
                }
            }
            else
            {
                throw new PaymentProcessBizException(-638, "상품 정보에 문제가 있습니다. 확인후 다시 주문해 주시기 바랍니다.");
            }

            PaymentInsertPolicyMultiParamT param = new PaymentInsertPolicyMultiParamT();

            #region set param

            param.OrderWayKind = paymentRequestInfo.OrderWayKind ;
            param.PaymentBasketPID = paymentBasketPID;
            param.PaymentDeliveryGroupNo = paymentDeliveryGroupNo;
            param.PaymentAmount = paymentAmount;
            param.ReceiverZipCode = paymentRequestInfo.ReceiverZipCode;
            param.Gbank = paymentRequestInfo.Gbank;
            param.Vaccount = paymentRequestInfo.Vaccount;
            param.Installmonth = paymentRequestInfo.Installmonth;
            param.SellerCustNo = paymentRequestInfo.SellerCustNo;
            param.PaymentOrderType = paymentRequestInfo.PaymentOrderType;
            param.CardCash = paymentRequestInfo.CardCash;
            param.AcntType = paymentRequestInfo.AcntType;
            //param.PackNo = packNo;

            param.ItemNo = plGdNo;
            param.PaymentGdSelNo = paymentGdSelNo;
            param.PaymentOrderIdx = paymentOrderIdx;
            param.GdNm = plGdNm;
            param.GdEngNm = plGdEngNm;
            param.GdKind = plGdKind;
            param.GdOrigin = plGdOrigin;
            param.GdlcCd = plGdlcCd;
            param.GdmcCd = plGdmcCd;
            param.GdscCd = plGdscCd;
            param.MakerNm = plMakerNm;
            param.BrandNm = plBrandNm;
            param.DealPriceKind = plDealPriceKind;
            param.DealPrice = plDealPrice;
            param.OpGd = plOpGd;
            param.AsYn = plAsYn;
            param.SellCustNo = plSellCustNo;
            param.GdShopkind = plGdShopkind;
            param.GdShopkind2 = plGdShopkind2;
            param.GdShopkind3 = plGdShopkind3;
            param.TradWay = plTradWay;
            param.TemplateType = plTemplateType;
            param.AdultYn = plAdultYn;
            param.Hasaddedfile = plHasaddedfile;
            param.InventoryNo = plInventoryNo;
            param.Inventorytype = plInventorytype;
            param.OptInventoryno = plOptInventoryno;
            param.OptInventorytype = plOptInventorytype;
            param.GdMadeSdt = plGdMadeSdt;
            param.AttribEndDt = plAttribEndDt;
            param.GdBuyerMlRate = plGdBuyerMlRate;
            param.GdBuddyMlRate = plGdBuddyMlRate;
            param.UseGubun = plUseGubun;
            param.BundleType = plBundleType;
            param.MinBuyCnt = plMinBuyCnt;
            param.BuyUnitCnt = plBuyUnitCnt;
            param.DangolChanceAmt = plDangolChanceAmt;
            param.DangolChanceKind = plDangolChanceKind;
            param.JehuRsvServiceType = plJehuRsvServiceType;
            param.JehuEstType = plJehuEstType;
            param.DntNo = plDntNo;
            param.DntWhoFee = plDntWhoFee;
            param.DntSaveMoney = plDntSaveMoney;
            param.FreecSellerchargeyn = plFreecSellerchargeyn;
            param.PaymentPrice = paymentPrice;
            param.PaymentSelItemPrice = paymentSelItemPrice;
            param.PaymentAmount = paymentAmount;
            param.PaymentDeliveryFee = paymentDeliveryFee;
            param.PaymentCostPrice = paymentCostPrice;
            param.PaymentDeliveryGroupNo = paymentDeliveryGroupNo;
            param.ShopGroupCd = plShopGroupCd;
            param.ShopGdlcCd = plShopGdlcCd;
            param.ShopGdmcCd = plShopGdmcCd;
            param.ShopGdscCd = plShopGdscCd;

            #endregion

            //int policyCount = paymentBiz.InsertGEPPaymentPolicyItemInfo(policyItemInfoList);

            List<PaymentInsertPolicyMultiResultT> paymentInsertPolicyMultiResult = paymentBiz.SetPaymentInsertPolicyMulti(param);

            if (paymentInsertPolicyMultiResult != null)
            {
                if (paymentInsertPolicyMultiResult.Count > 0)
                {
                    int retCode = paymentInsertPolicyMultiResult[0].RetCode;

                    if (retCode < 0)
                    {
                        throw new PaymentProcessBizException(retCode, "상품 정보에 문제가 있습니다. 확인후 다시 주문해 주시기 바랍니다.");
                    }

                    paymentOrderItem.OrderNo = string.Empty;

                    foreach (PaymentInsertPolicyMultiResultT item in paymentInsertPolicyMultiResult)
                    {
                        paymentOrderItem.PolicyInfoList.Add(item);

                        paymentOrderItem.OrderNo = PaymentUtil.AddComma(paymentOrderItem.OrderNo + item.OrderNo.ToString());
                    }
                }
            }

            return paymentOrderItem;
        }
Пример #5
0
        /// <summary>
        /// 주문 파라메터를 주문 SP 파라메터로 변환
        /// </summary>
        /// <param name="paymentParam"></param>
        /// <returns></returns>
        public static PaymentOrderMultiParamT ConvertRequestInfo2OrderParam(PaymentRequestInfoT paymentParam)
        {
            PaymentOrderMultiParamT orderParam = new PaymentOrderMultiParamT();

            #region set orderParam

            orderParam.OrderWayKind = paymentParam.OrderWayKind;
            orderParam.PosShopCd = paymentParam.PosShopCd;
            orderParam.PosClassCd = paymentParam.PosClassCd;
            orderParam.PosClassKind = paymentParam.PosClassKind;
            orderParam.PrimaryCheckValue = paymentParam.PrimaryCheckValue;
            orderParam.ShoppingGuideNo = paymentParam.ShoppingGuideNo;
            orderParam.InterestGroupNo = paymentParam.InterestGroupNo;
            orderParam.BasketPID = paymentParam.BasketPid;
            orderParam.GdSelNo = paymentParam.GdSelNo;
            orderParam.OrderIdx = paymentParam.SelectedOrderIdxs;
            orderParam.JaehuID = paymentParam.CurrentJaehuID;
            orderParam.JaehuIDs = paymentParam.JaehuID;
            orderParam.GoodsCode = paymentParam.ItemNo;
            orderParam.OrderNo = paymentParam.OrderNo;
            orderParam.OrderPrice = paymentParam.OrderPrice;
            orderParam.OrderCnts = paymentParam.OrderCounts;
            //orderParam.SelItemPrice = paymentParam.SelItemPrice;
            //orderParam.InventorySeqNo = paymentParam.InventorySeqNo;
            //orderParam.OptInventorySeqNo = paymentParam.InventorySeqNoOpt;
            orderParam.ReservationRsvNo = paymentParam.ReservationRsvNo;
            orderParam.PolicyNos = paymentParam.PolicyNo;
            orderParam.DeliveryGoodsYN = paymentParam.DeliveryGoodsYN;
            orderParam.OnlineTransportSid = paymentParam.OnlineTransportSid;
            //orderParam.JehuGdCds = paymentParam.Jehugoodscode;
            //orderParam.JehuOrderCnts = paymentParam.Jehuordercnts;
            //orderParam.JehuOrderNo = paymentParam.Jehuorderno;
            //orderParam.JehuLType = paymentParam.Jehuorderltype;
            //orderParam.JehuAtype = paymentParam.Jehuorderatype;
            //orderParam.GiftPackYn = paymentParam.GiftPackYN;
            //orderParam.GiftShopYN = paymentParam.GiftShopYN;
            orderParam.RealCostPrice = paymentParam.RealCostPrice;
            orderParam.RealDealerCostPrice = paymentParam.RealDealerCostPrice;
            orderParam.RealDealerCostBasisNo = paymentParam.RealDealerCostBasisNo;
            orderParam.Sid = paymentParam.Sid;
            orderParam.PlusDisBcCondNos = paymentParam.PlusDisBcCondNos;
            orderParam.PlusDisSatisCnts = paymentParam.PlusDisSatisCounts;
            orderParam.SetCostScdNos = paymentParam.SetCostScdNos;
            orderParam.SetCondScdNos = paymentParam.SetCondScdNos;
            orderParam.PackCostPcdNos = paymentParam.PackCostPcdNos;
            orderParam.PackCondPcdNos = paymentParam.PackCondPcdNos;
            orderParam.PackCostSatisCnts = paymentParam.PackCostSatisCounts;
            //orderParam.AuctionNo = paymentParam.AucNo;
            //orderParam.AuctionBidPrice = Validate.IsNumeric(paymentParam.AuctionBidPrice) ? Convert.ToDecimal(paymentParam.AuctionBidPrice) : 0;
            //orderParam.AuctionBidAmt = Validate.IsNumeric(paymentParam.AuctionBidAmt) ? Convert.ToInt32(paymentParam.AuctionBidAmt) : 0;
            //orderParam.BidNo = Validate.IsNumeric(paymentParam.BidNo) ? Convert.ToInt32(paymentParam.BidNo) : 0;
            orderParam.CustNo = paymentParam.CustNo;
            orderParam.LoginID = paymentParam.LoginID;
            orderParam.MemberWay = paymentParam.MemberType;
            orderParam.BuyerName = paymentParam.BuyerName;
            orderParam.BuyerTelNo = paymentParam.BuyerTelNo;
            orderParam.BuyerEmail = paymentParam.BuyerEmail;
            orderParam.BuyerSSN = string.Empty;	// 비회원 주문은 없다
            orderParam.BuyerIdentificationNo = string.Empty;	// 비회원 주문은 없다
            orderParam.PayAuthSeq = paymentParam.PayAuthSeq;
            orderParam.CardCash = paymentParam.CardCash;
            orderParam.AcntType = paymentParam.AcntType;
            orderParam.PaymentCode = paymentParam.PaymentCode;
            orderParam.SettleLimitKey = paymentParam.SettleLimitKey;
            orderParam.OnCreditYN = paymentParam.OncreditYN;
            orderParam.Gbank = paymentParam.Gbank;
            orderParam.DepositNm = paymentParam.DepositName;
            orderParam.Vaccount = paymentParam.Vaccount;
            orderParam.VacntNo = paymentParam.VacntNo;
            orderParam.GbankGubun = paymentParam.GbankGubun;
            orderParam.ForeignMoney = paymentParam.ForeignMoney;
            //orderParam.TransactionNo = paymentParam.TransTransactionConfirmNo;
            //orderParam.TransBankNo = paymentParam.TransBankNo;
            //orderParam.TransOrderNo = paymentParam.TransOrderNo;
            //orderParam.TransSeqNo = Validate.IsNumeric(paymentParam.TransSeqNo) ? Convert.ToInt16(paymentParam.TransSeqNo) : (short)0;
            orderParam.IsCorpCard = paymentParam.IsCorpCard;
            orderParam.VirtualCardKind = paymentParam.VirtualCardKind;
            orderParam.CardNumber = paymentParam.CardNumber;
            orderParam.Installmonth = paymentParam.Installmonth;
            orderParam.FreeInterestNo = paymentParam.FreeInterestNo;
            orderParam.HalbuType = paymentParam.HalbuType;
            orderParam.CardYear = paymentParam.CardYear;
            orderParam.CardMonth = paymentParam.CardMonth;
            orderParam.CardPwd = paymentParam.CardPwd;
            orderParam.SocialNo2 = paymentParam.SocialNo2;
            orderParam.KVPSessionkey = paymentParam.KvpSessionkey;
            orderParam.KVPEncdata = paymentParam.KvpEncdata;
            orderParam.KVPCardCode = paymentParam.KvpCardcode;
            orderParam.Xid = paymentParam.Xid;
            orderParam.Eci = paymentParam.Eci;
            orderParam.Cavv = paymentParam.Cavv;
            orderParam.PaySaveCardYN = paymentParam.PaySaveCardYN;
            //orderParam.FrCode = paymentParam.FrCode;
            //orderParam.CellPhoneHpNo = paymentParam.CellphoneAuthHpNo;
            //orderParam.CellPhoneAuthKind = paymentParam.CellphoneAuthKind;
            //orderParam.CellPhoneSessionKey = paymentParam.CellphoneSessionkey;
            //orderParam.CellPhoneAuthNo = paymentParam.CellphoneAuthNo;
            //orderParam.CellPhoneIdentificationNo = paymentParam.CellPhoneIdentificationNo;
            orderParam.PaypalNo = Validate.IsNumeric(paymentParam.PaypalNo) ? Convert.ToInt32(paymentParam.PaypalNo) : 0;
            orderParam.PaypalToken = paymentParam.PaypalToken;
            orderParam.BibitNo = paymentParam.BibitNo;
            //orderParam.TCashID = paymentParam.TcashTid;
            orderParam.TaxIssueYN = paymentParam.TaxIssueYN;
            orderParam.CashIssueYN = paymentParam.CashIssueYN;
            orderParam.TaxChargeTeam = paymentParam.TaxChargeTeam;
            orderParam.TaxChargeName = paymentParam.TaxChargeName;
            orderParam.TaxRegNo = paymentParam.TaxRegNo;
            orderParam.TaxCompanyNm = paymentParam.TaxCompanyName;
            orderParam.TaxBoss = paymentParam.TaxBoss;
            orderParam.TaxAddress = paymentParam.TaxAddress;
            orderParam.TaxRcvAddress = paymentParam.TaxRcvAddress;
            orderParam.TaxZipCode = paymentParam.TaxZipCode;
            orderParam.TaxCategory = paymentParam.TaxCategory;
            orderParam.TaxKind = paymentParam.TaxKind;
            orderParam.TaxEmail = paymentParam.TaxEmail;
            orderParam.TaxPhone = paymentParam.TaxPhone;
            orderParam.TaxMemo = paymentParam.TaxMemo;
            orderParam.CashUseType = (string.IsNullOrEmpty(paymentParam.CashUseType) || paymentParam.CashUseType == "0") ? false : true;
            orderParam.CashRegNo = paymentParam.CashRegNo;
            orderParam.CashName = paymentParam.CashName;
            orderParam.CashPhone = paymentParam.CashPhone;
            orderParam.CashEmail = paymentParam.CashEmail;
            orderParam.CashReceiptYN = paymentParam.CashReceiptYN;
            orderParam.IdFlag = paymentParam.CashIdFlag;
            orderParam.AddressNo = 0;
            orderParam.ReceiverZipCode = paymentParam.ReceiverZipCode;
            orderParam.ReceiverAddr1 = paymentParam.ReceiverAddress1;
            orderParam.ReceiverAddr2 = paymentParam.ReceiverAddress2;
            orderParam.ReceiverName = paymentParam.ReceiverName;
            orderParam.ReceiverHpNo = paymentParam.ReceiverHpNo;
            orderParam.ReceiverPhoneNo = paymentParam.ReceiverPhoneNo;
            orderParam.Interval = paymentParam.Interval;
            orderParam.DelMemo = paymentParam.DelMemo;
            //orderParam.CouponGiftGroupNo = Validate.IsNumeric(paymentParam.CouponGiftGroupNo) ? Convert.ToInt32(paymentParam.CouponGiftGroupNo) : 0;
            //orderParam.SendGiftYN = paymentParam.SendGiftYN;
            //orderParam.GiftReceiverCustNo = paymentParam.GiftReceiverCustNo;
            //orderParam.GiftRecevierNm = paymentParam.GiftReceiverName;
            //orderParam.GiftReceiverHp = paymentParam.GiftReceiverHpNo;
            //orderParam.GiftReceiverId = paymentParam.GiftReceiverID;
            //orderParam.GiftReceiverEmail = paymentParam.GiftReceiverEmail;
            //orderParam.GiftMemo = paymentParam.GiftMemo;
            //orderParam.SenderInfoKindI = paymentParam.SenderInfoKindI;
            //orderParam.SenderInfoKindE = paymentParam.SenderInfoKindE;
            //orderParam.SenderInfoKindH = paymentParam.SenderInfoKindH;
            //orderParam.SendGiftWay = paymentParam.SendGiftWay;
            //orderParam.MsgKind = paymentParam.GiftMessageKind;
            //orderParam.GiftSenderNm = paymentParam.GiftSenderName;
            //orderParam.GiftSenderId = paymentParam.GiftSenderID;
            //orderParam.GiftSenderEmail = paymentParam.GiftSenderEmail;
            //orderParam.GiftSenderHpNo = paymentParam.GiftSenderHpNo;
            orderParam.RemoteAddr = paymentParam.RemoteAddress;
            orderParam.ServerIPAddr = paymentParam.ServerIPAddress;
            orderParam.ReceiveMailYN = paymentParam.ReceiveMailYn;
            orderParam.ReceiveSmsYN = paymentParam.ReceiveSmsYN;
            orderParam.GlinkNations = paymentParam.GlinkNation;
            //orderParam.OkCashBagSaveYn = paymentParam.OkcashbagSaveYN;
            //orderParam.Pwd = string.Empty;	// 비회원 주문 없다
            orderParam.OuterOrderNos = paymentParam.OuterOrderNos;
            //orderParam.PartnerGiftMsg = paymentParam.PartnerGiftMessage;
            //orderParam.PartnerGiftMsgReceiver = paymentParam.PartnerGiftMessageReceiver;
            //orderParam.PartnerGiftMsgSender = paymentParam.PartnerGiftMessageSender;

            #endregion

            return orderParam;
        }
Пример #6
0
        /// <summary>
        /// 파라메터 변환
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static PaymentRequestInfoT ConvertRequestInfo(Dictionary<string, string> value)
        {
            PaymentRequestInfoT requestInfo = new PaymentRequestInfoT();

            #region 파라메터 값 Set

            #region Customer

            requestInfo.CustNo = GetParamValue(value, "cust_no");
            requestInfo.MemberType = GetParamValue(value, "member_type");

            requestInfo.BuyerName = GetParamValue(value, "buyer_name");
            requestInfo.BuyerTelNo1 = GetParamValue(value, "buyer_tel_no1");
            requestInfo.BuyerTelNo2 = GetParamValue(value, "buyer_tel_no2");
            requestInfo.BuyerTelNo3 = GetParamValue(value, "buyer_tel_no3");
            requestInfo.BuyerEmail = GetParamValue(value, "buyer_email");
            requestInfo.BuyerSsn1 = GetParamValue(value, "buyer_ssn1");
            requestInfo.BuyerSsn2 = GetParamValue(value, "buyer_ssn2");

            requestInfo.IsRcvMail = GetParamValue(value, "isRcvMail");
            requestInfo.IsRcvSMS = GetParamValue(value, "isRcvSMS");

            requestInfo.SocialNo2 = GetParamValue(value, "social_no2").Trim().Replace("-", string.Empty);

            #endregion

            #region Transport

            requestInfo.DeliveryGoodsYN = GetParamValue(value, "delivery_goods_yn").Replace(" ", string.Empty);

            requestInfo.Oaddress1_2 = GetParamValue(value, "oaddress1_2");
            requestInfo.Oaddress2_2 = GetParamValue(value, "oaddress2_2");
            requestInfo.ReceiverName_2 = GetParamValue(value, "receiver_name_2");
            requestInfo.ReceiverPhoneNo1_2 = GetParamValue(value, "receiver_phone_no1_2");
            requestInfo.ReceiverPhoneNo2_2 = GetParamValue(value, "receiver_phone_no2_2");
            requestInfo.ReceiverPhoneNo3_2 = GetParamValue(value, "receiver_phone_no3_2");
            requestInfo.ReceiverHpNo1_2 = GetParamValue(value, "receiver_hp_no1_2");
            requestInfo.ReceiverHpNo2_2 = GetParamValue(value, "receiver_hp_no2_2");
            requestInfo.ReceiverHpNo3_2 = GetParamValue(value, "receiver_hp_no3_2");
            requestInfo.OzipCode_2 = GetParamValue(value, "ozip_code_2");
            requestInfo.NationIsocode_2 = GetParamValue(value, "nation_isocode_2");

            requestInfo.SenderName_2 = GetParamValue(value, "sender_name_2");

            requestInfo.Oaddress1 = GetParamValue(value, "oaddress1");
            requestInfo.Oaddress2 = GetParamValue(value, "oaddress2");

            requestInfo.ReceiverName = GetParamValue(value, "receiver_name");
            requestInfo.ReceiverPhoneNo1 = GetParamValue(value, "receiver_phone_no1");
            requestInfo.ReceiverPhoneNo2 = GetParamValue(value, "receiver_phone_no2");
            requestInfo.ReceiverPhoneNo3 = GetParamValue(value, "receiver_phone_no3");
            requestInfo.ReceiverHpNo1 = GetParamValue(value, "receiver_hp_no1");
            requestInfo.ReceiverHpNo2 = GetParamValue(value, "receiver_hp_no2");
            requestInfo.ReceiverHpNo3 = GetParamValue(value, "receiver_hp_no3");

            requestInfo.OzipCode1_2 = GetParamValue(value, "ozip_code1_2");
            requestInfo.OzipCode2_2 = GetParamValue(value, "ozip_code2_2");

            requestInfo.OzipCode1 = GetParamValue(value, "ozip_code1");
            requestInfo.OzipCode2 = GetParamValue(value, "ozip_code2");

            requestInfo.OrderMemoCount = Util.GetSafeInt(GetParamValue(value, "order_memo_cnt"), 0);

            requestInfo.ReceiverName_1 = GetParamValue(value, "receiver_name_1");
            requestInfo.OZipCode1_1 = GetParamValue(value, "ozip_code1_1");
            requestInfo.OZipCode2_1 = GetParamValue(value, "ozip_code2_1");
            requestInfo.OAddress1_1 = GetParamValue(value, "oaddress1_1");
            requestInfo.OAddress2_1 = GetParamValue(value, "oaddress2_1");
            requestInfo.ReceiverPhoneNo1_1 = GetParamValue(value, "receiver_phone_no1_1");
            requestInfo.ReceiverPhoneNo2_1 = GetParamValue(value, "receiver_phone_no2_1");
            requestInfo.ReceiverPhoneNo3_1 = GetParamValue(value, "receiver_phone_no3_1");
            requestInfo.ReceiverHpNo1_1 = GetParamValue(value, "receiver_hp_no1_1");
            requestInfo.ReceiverHpNo2_1 = GetParamValue(value, "receiver_hp_no2_1");
            requestInfo.ReceiverHpNo3_1 = GetParamValue(value, "receiver_hp_no3_1");

            #endregion

            #region Item

            requestInfo.ItemNo = GetParamValue(value, "gd_no");
            requestInfo.GoodsType = GetParamValue(value, "goods_type").Replace(" ", string.Empty);
            requestInfo.TradWay = GetParamValue(value, "trad_way");
            requestInfo.ItemCount = Util.GetSafeInt(GetParamValue(value, "goods_cnt"), 0);
            requestInfo.SelInfo = GetParamValue(value, "sel_info");
            requestInfo.OrderCounts = GetParamValue(value, "order_cnts").Replace(" ", string.Empty);

            #endregion

            #region Payment

            requestInfo.BasketPid = GetParamValue(value, "basket_pid");
            requestInfo.GdSelNo = GetParamValue(value, "gd_sel_no").Replace(" ", string.Empty);

            requestInfo.ShopOrder = GetParamValue(value, "shop_order");
            requestInfo.Mode = GetParamValue(value, "mode");
            requestInfo.SelectedOrderIdxs = GetParamValue(value, "selected_order_idxs");

            requestInfo.OrderPrice = GetParamValue(value, "order_price").Replace(" ", string.Empty);

            requestInfo.DeliveryFee = GetParamValue(value, "delivery_fee");
            requestInfo.DeliveryGroupNo = GetParamValue(value, "delivery_group_no");
            requestInfo.RealDeliveryFee = GetParamValue(value, "real_delivery_fee");
            requestInfo.RealDeliveryGroupNo = GetParamValue(value, "real_delivery_group_no");
            requestInfo.RealCostPrice = GetParamValue(value, "real_cost_price");
            requestInfo.RealCostBasisNo = GetParamValue(value, "real_cost_basis_no").Replace("^", string.Empty);
            requestInfo.RealCostWhoFee = GetParamValue(value, "real_cost_who_fee");
            requestInfo.RealCostResult = GetParamValue(value, "real_cost_result");
            requestInfo.RealCostPriceYN = GetParamValue(value, "real_cost_price_yn").Replace(" ", string.Empty);

            requestInfo.PayAuthSeq = Util.GetSafeInt(GetParamValue(value, "pay_auth_seq"));

            requestInfo.OuterOrderNos = GetParamValue(value, "outer_order_nos").Replace(" ", string.Empty);

            #endregion

            #region PayMethod

            requestInfo.CardCash = GetParamValue(value, "card_cash").ToUpper();
            requestInfo.PayMethod = GetParamValue(value, "paymethod").Replace(" ", string.Empty);
            requestInfo.PaypalToken = GetParamValue(value, "paypal_token").Replace(" ", string.Empty);
            requestInfo.PaypalNo = GetParamValue(value, "paypal_no").Replace(" ", string.Empty);
            requestInfo.BibitNo = Util.GetSafeInt(GetParamValue(value, "bibit_no").Replace(" ", string.Empty));
            requestInfo.SettleLimitKey = GetParamValue(value, "settle_limit_key");
            requestInfo.PaymentMethod = GetParamValue(value, "payment_method");

            requestInfo.CardNumber1 = GetParamValue(value, "card_number1");
            requestInfo.CardNumber2 = GetParamValue(value, "card_number2");
            requestInfo.CardNumber3 = GetParamValue(value, "card_number3");
            requestInfo.CardNumber4 = GetParamValue(value, "card_number4");
            requestInfo.CardYear = GetParamValue(value, "card_year");
            requestInfo.CardMonth = GetParamValue(value, "card_month");
            requestInfo.CardPwd = GetParamValue(value, "card_pwd");

            requestInfo.IsCorpCard = GetParamValue(value, "isCorp_card");

            requestInfo.Gbank = Util.GetSafeInt(GetParamValue(value, "gbank"));
            requestInfo.GbankPaypal = Util.GetSafeInt(GetParamValue(value, "gbank_method"));
            requestInfo.GbankGubun = GetParamValue(value, "gbank_gubun");
            requestInfo.ForeignMoney = Util.GetSafeDecimal(GetParamValue(value, "gbank_money").Replace("$", string.Empty).Replace("¥", string.Empty).Trim(), 0);
            requestInfo.DepositName = GetParamValue(value, "deposit_nm");

            requestInfo.CashUseType = GetParamValue(value, "cash_use_type");
            requestInfo.CashRegNo = GetParamValue(value, "cash_reg_no");
            requestInfo.CashName = GetParamValue(value, "cash_name");
            requestInfo.CashPhone = GetParamValue(value, "cash_phone");
            requestInfo.CashEmail = GetParamValue(value, "cash_email");
            requestInfo.CashIdFlag = GetParamValue(value, "cash_id_flag");

            requestInfo.CcExpMonth = GetParamValue(value, "ccExpMonth");
            requestInfo.CcExpYear = GetParamValue(value, "ccExpYear");

            #endregion

            #region Tax

            requestInfo.TaxIssueYN = GetParamValue(value, "tax_issue_yn").Replace(" ", string.Empty);
            requestInfo.CashIssueYN = GetParamValue(value, "cash_issue_yn").Replace(" ", string.Empty);
            requestInfo.RequestTax = GetParamValue(value, "requestTax");
            requestInfo.TaxRegNo = GetParamValue(value, "reg_no");
            requestInfo.TaxCompanyName = GetParamValue(value, "company_name");
            requestInfo.TaxBoss = GetParamValue(value, "boss");
            requestInfo.TaxAddress = GetParamValue(value, "Address");
            requestInfo.TaxRcvAddress = GetParamValue(value, "Rcv_address");
            requestInfo.TaxZipCode = GetParamValue(value, "zip_code_");
            requestInfo.TaxCategory = GetParamValue(value, "category");
            requestInfo.TaxKind = GetParamValue(value, "kind");
            requestInfo.TaxEmail = GetParamValue(value, "tax_email");
            requestInfo.TaxPhone = GetParamValue(value, "tax_phone");
            requestInfo.TaxMemo = GetParamValue(value, "tax_memo").Replace("'", "`").Replace("\"", "");
            requestInfo.TaxChargeTeam = GetParamValue(value, "tax_charge_team");
            requestInfo.TaxChargeName = GetParamValue(value, "tax_charge_name");

            #endregion

            #region Global

            requestInfo.GlinkNation = GetParamValue(value, "glink_nation");
            requestInfo.GlinkSellPrice = GetParamValue(value, "glink_sell_price");
            requestInfo.GlinkDelFee = GetParamValue(value, "glink_del_fee");
            requestInfo.GlinkAddInfo = GetParamValue(value, "glink_add_info");

            #endregion

            #region Etc

            requestInfo.SafecallUse = GetParamValue(value, "safecall_use").ToUpper();
            requestInfo.InstBypass = GetParamValue(value, "inst_bypass");

            requestInfo.PosShopCd = GetParamValue(value, "pos_shop_cd").Replace(" ", string.Empty);
            requestInfo.PosClassCd = GetParamValue(value, "pos_class_cd").Replace(" ", string.Empty);
            requestInfo.PosClassKind = GetParamValue(value, "pos_class_kind").Replace(" ", string.Empty);

            requestInfo.OrderSiteInfo = GetParamValue(value, "order_site_info");

            #endregion

            #region Gep에서 안쓰는 것(으로 추정)

            requestInfo.OrderType = GetParamValue(value, "order_type");
            requestInfo.AbroadYN = GetParamValue(value, "abroad_yn");
            requestInfo.OrderInfoPbid = GetParamValue(value, "orderInfo_pbid");
            requestInfo.Pwd1 = GetParamValue(value, "pwd1");

            requestInfo.AuthSdt = GetParamValue(value, "auth_sdt");
            requestInfo.AuthEdt = GetParamValue(value, "auth_edt");

            #endregion

            requestInfo.JaehuID = GetParamValue(value, "order_jaehuid").Replace(" ", string.Empty);
            requestInfo.PolicyNo = GetParamValue(value, "policy_no").Replace(" ", string.Empty);
            requestInfo.TotalAuthMoney = Util.GetSafeDecimal(GetParamValue(value, "TotalAuthMoney").Replace(" ", string.Empty));

            requestInfo.SaveFlag = GetParamValue(value, "save_flag").Replace(" ", string.Empty);

            //PaymentParam.TcashTid = GetFormCollectionValue(values, "tcash_tid").Replace(" ", string.Empty);

            //PaymentParam.OkcashbagSaveYN = GetFormCollectionValue(values, "okcashbag_save_yn").ToUpper();

            //PaymentParam.PartnerGiftMessage = GetFormCollectionValue(values, "partner_gift_msg");
            //PaymentParam.PartnerGiftMessageReceiver = GetFormCollectionValue(values, "partner_gift_msg_receiver");
            //PaymentParam.PartnerGiftMessageSender = GetFormCollectionValue(values, "partner_gift_msg_sender");

            requestInfo.State = GetParamValue(value, "state");

            requestInfo.Interval = GetParamValue(value, "interval");
            requestInfo.BuyType = GetParamValue(value, "buy_type");

            requestInfo.Sid = GetParamValue(value, "sid");

            requestInfo.RealDeliveryInfo = GetParamValue(value, "real_delivery_info");
            requestInfo.RealDeliveryFeeInfo = GetParamValue(value, "real_delivery_fee_info");
            requestInfo.CouponNo = GetParamValue(value, "coupon_no");
            requestInfo.PlusDiscountKey = GetParamValue(value, "plus_dis_key").Replace(" ", string.Empty);
            requestInfo.PlusDiscountChkVal = GetParamValue(value, "plus_dis_chk_val").Replace(" ", string.Empty);
            requestInfo.SetCostCountKey = GetParamValue(value, "set_cost_key").Replace(" ", string.Empty);
            requestInfo.SetCostCountChkVal = GetParamValue(value, "set_cost_chk_val").Replace(" ", string.Empty);
            requestInfo.PackCostCountKey = GetParamValue(value, "pack_cost_key").Replace(" ", string.Empty);
            requestInfo.PackCostCountChkVal = GetParamValue(value, "pack_cost_chk_val").Replace(" ", string.Empty);
            requestInfo.DelMemo0 = GetParamValue(value, "del_memo0");
            requestInfo.DelMemo = GetParamValue(value, "del_memo");
            requestInfo.KvpQuota = GetParamValue(value, "KVP_QUOTA");
            requestInfo.KvpSessionkey = GetParamValue(value, "KVP_SESSIONKEY");
            requestInfo.KvpEncdata = GetParamValue(value, "KVP_ENCDATA");
            requestInfo.KvpCardcode = GetParamValue(value, "KVP_CARDCODE");
            //PaymentParam.AucNo = GetFormCollectionValue(values, "auc_no");
            //PaymentParam.AuctionBidPrice = GetFormCollectionValue(values, "auction_bid_price");
            //PaymentParam.AuctionBidAmt = GetFormCollectionValue(values, "auction_bid_amt");
            //PaymentParam.AuctionSellerCustNo = GetFormCollectionValue(values, "auction_seller_cust_no");
            //PaymentParam.BidNo = GetFormCollectionValue(values, "bid_no");
            requestInfo.AucOrderWayKind = GetParamValue(value, "auc_order_way_kind");
            requestInfo.Xid = GetParamValue(value, "xid");
            requestInfo.Eci = GetParamValue(value, "eci");
            requestInfo.Cavv = GetParamValue(value, "cavv");
            requestInfo.VirtualCardKind1 = GetParamValue(value, "virtual_card_kind1");
            requestInfo.VirtualCardKind2 = GetParamValue(value, "virtual_card_kind2");
            requestInfo.VirtualCardKind3 = GetParamValue(value, "virtual_card_kind3");
            requestInfo.VirtualCardKind4 = GetParamValue(value, "virtual_card_kind4");
            requestInfo.VirtualCardKind5 = GetParamValue(value, "virtual_card_kind5");
            requestInfo.InventorySeqNo = GetParamValue(value, "inventory_seq_no").Replace(" ", string.Empty);
            requestInfo.InventorySeqNoOpt = GetParamValue(value, "inventory_seq_no_opt").Replace(" ", string.Empty);
            requestInfo.OncreditYN = GetParamValue(value, "oncredit_yn");
            requestInfo.Vaccount = GetParamValue(value, "vaccount");
            requestInfo.VacntNo = GetParamValue(value, "vacnt_no");
            //PaymentParam.TransTransactionConfirmNo = GetFormCollectionValue(values, "trans_transaction_confirm_no");
            //PaymentParam.TransBankNo = GetFormCollectionValue(values, "trans_bank_no");
            //PaymentParam.TransCardCash = GetFormCollectionValue(values, "trans_card_cash");
            //PaymentParam.TransOrderNo = GetFormCollectionValue(values, "trans_order_no");
            //PaymentParam.TransSeqNo = GetFormCollectionValue(values, "trans_seq_no");
            requestInfo.FreeInterestNo = Util.GetSafeInt(GetParamValue(value, "fi_no"));
            requestInfo.HalbuType = GetParamValue(value, "halbu_type");
            requestInfo.Installmonth = Util.GetSafeInt(GetParamValue(value, "normal_installmonth"));
            requestInfo.MpiInstallmonth = GetParamValue(value, "mpi_installmonth");
            requestInfo.IspInstallmonth = GetParamValue(value, "isp_installmonth");
            requestInfo.ReceiveMailYn = GetParamValue(value, "receive_mail_yn");
            requestInfo.ReceiveSmsYN = GetParamValue(value, "receive_sms_yn");
            requestInfo.RealDealerCostBasisNo = GetParamValue(value, "real_dealer_cost_basis_no");
            requestInfo.RealDealerCostPrice = GetParamValue(value, "real_dealer_cost_price");
            requestInfo.SellerCustNo = GetParamValue(value, "seller_cust_no");
            requestInfo.ShoppingGuideNo = GetParamValue(value, "shopping_guide_no").Replace(" ", string.Empty);
            requestInfo.ReservationRsvNo = Util.GetSafeInt(GetParamValue(value, "reservation_rsv_no"));
            requestInfo.TotalSticker = Util.GetSafeInt(GetParamValue(value, "TotalStamp"));
            requestInfo.SplitSticker = GetParamValue(value, "itemStamp");
            requestInfo.SplitStickerWhoFee = GetParamValue(value, "itemStampWhoFee");
            //PaymentParam.Jehugoodscode = GetFormCollectionValue(values, "jehugoodscode");
            //PaymentParam.Jehuordercnts = GetFormCollectionValue(values, "jehuordercnts");
            //PaymentParam.Jehuorderno = GetFormCollectionValue(values, "jehuorderno");
            //PaymentParam.Jehuorderltype = GetFormCollectionValue(values, "jehuorderltype");
            //PaymentParam.Jehuorderatype = GetFormCollectionValue(values, "jehuorderatype");
            requestInfo.PaymentName = GetParamValue(value, "payment_nm");
            requestInfo.HidBranchInfo = GetParamValue(value, "hidBranchInfo");
            requestInfo.InterestGroupNo = GetParamValue(value, "interest_group_no").Replace(" ", string.Empty);
            //PaymentParam.GiftPackYN = GetFormCollectionValue(values, "GiftPackYn").Replace(" ", string.Empty);
            //PaymentParam.GiftShopYN = GetFormCollectionValue(values, "GiftShopYN").Replace(" ", string.Empty);
            requestInfo.SpecTransFee = GetParamValue(value, "SpecTransFee").Replace(" ", string.Empty);
            //PaymentParam.CellphoneSessionkey = GetFormCollectionValue(values, "cellphone_sessionkey");
            //PaymentParam.CellphoneAuthNo = GetFormCollectionValue(values, "cellphone_auth_no");
            //PaymentParam.CellphoneAuthKind = GetFormCollectionValue(values, "cellphone_auth_kind");
            //PaymentParam.CellphoneAuthHpNo = GetFormCollectionValue(values, "cellphone_auth_hp_no");
            requestInfo.ChanceKind = GetParamValue(value, "chance_kind");
            requestInfo.ChanceAmount = GetParamValue(value, "chance_amt");
            requestInfo.ReserveOrderYN = GetParamValue(value, "reserve_order_yn").Replace(" ", string.Empty);
            //PaymentParam.SendGiftYN = GetFormCollectionValue(values, "send_gift_default_yn");
            //PaymentParam.GiftReceiverCustNo = GetFormCollectionValue(values, "gift_receiver_cust_no_default");
            //PaymentParam.GiftReceiverName = GetFormCollectionValue(values, "gift_receiver_nm_default");
            //PaymentParam.GiftReceiverHpNo = GetFormCollectionValue(values, "gift_receiver_hp_default");
            //PaymentParam.GiftReceiverID = GetFormCollectionValue(values, "gift_receiver_id_default");
            //PaymentParam.GiftReceiverEmail = GetFormCollectionValue(values, "gift_receiver_email_default");
            //PaymentParam.GiftMemo = GetFormCollectionValue(values, "gift_memo_default");
            //PaymentParam.SenderInfoKindI = GetFormCollectionValue(values, "sender_info_kind_default_i");
            //PaymentParam.SenderInfoKindE = GetFormCollectionValue(values, "sender_info_kind_default_e");
            //PaymentParam.SenderInfoKindH = GetFormCollectionValue(values, "sender_info_kind_default_h");
            //PaymentParam.GiftMessageKind = GetFormCollectionValue(values, "gift_msg_kind");
            requestInfo.SendGiftTokenYN = GetParamValue(value, "send_gift_token_yn");
            requestInfo.GiftReceiverCustNoToken = GetParamValue(value, "gift_receiver_cust_no_token");
            requestInfo.GiftReceiverNmToken = GetParamValue(value, "gift_receiver_nm_token");
            requestInfo.GiftReceiverHpToken = GetParamValue(value, "gift_receiver_hp_token");
            requestInfo.GiftReceiverIdToken = GetParamValue(value, "gift_receiver_id_token");
            requestInfo.GiftReceiverEmailToken = GetParamValue(value, "gift_receiver_email_token");
            requestInfo.GiftMemoToken = GetParamValue(value, "gift_memo_token");
            //PaymentParam.SendGiftWay = GetFormCollectionValue(values, "send_gift_way");
            //PaymentParam.GiftSenderName = GetFormCollectionValue(values, "gift_sender_nm_default");
            //PaymentParam.GiftSenderID = GetFormCollectionValue(values, "gift_sender_id_default");
            //PaymentParam.GiftSenderEmail = GetFormCollectionValue(values, "gift_sender_email_default");
            //PaymentParam.GiftSenderHpNo = GetFormCollectionValue(values, "gift_sender_hp_default");
            //PaymentParam.CouponGiftGroupNo = GetFormCollectionValue(values, "coupon_gift_group_no");

            requestInfo.WishPickupDt = GetParamValue(value, "wish_pickup_dt");
            requestInfo.TransMemo = GetParamValue(value, "trans_memo");
            requestInfo.TransGoodsinfo = GetParamValue(value, "trans_goods_info");
            requestInfo.CsdUseYN = GetParamValue(value, "csd_use_yn").Replace(" ", string.Empty);
            requestInfo.CsdGdNo = GetParamValue(value, "csd_app_gd_no_arr").Replace(" ", string.Empty);
            requestInfo.CsdGdSelNo = GetParamValue(value, "csd_app_gd_sel_no_arr").Replace(" ", string.Empty);
            requestInfo.CsdOrderCount = GetParamValue(value, "csd_app_order_cnt_arr").Replace(" ", string.Empty);
            requestInfo.CsdCostBasisNo = GetParamValue(value, "csd_app_cost_basis_no_arr").Replace(" ", string.Empty);
            requestInfo.CsdCostPrice = GetParamValue(value, "csd_app_cost_price_arr");
            requestInfo.TotalPayPrice = Util.GetSafeInt(GetParamValue(value, "TotalPayPrice"));
            requestInfo.GBankMoney = Util.GetSafeInt(GetParamValue(value, "gBankMoney"));
            requestInfo.GBankVAccount = GetParamValue(value, "gBankVAccount");
            requestInfo.GBankAcntNo = GetParamValue(value, "gBankAcntNo");
            requestInfo.GBankMileage = Util.GetSafeInt(GetParamValue(value, "gBankMileage"));
            requestInfo.GBankMileageVAccount = GetParamValue(value, "gBankMileageVAccount");
            requestInfo.GBankMileageAcntNo = GetParamValue(value, "gBankMileageAcntNo");
            requestInfo.GBankBcash = Util.GetSafeInt(GetParamValue(value, "gBankBcash"));
            requestInfo.GBankBcashVAccount = GetParamValue(value, "gBankBcashVAccount");
            requestInfo.GBankBcashAcntNo = GetParamValue(value, "gBankBcashAcntNo");
            requestInfo.OkCashBagPoint = Util.GetSafeInt(GetParamValue(value, "OkCashBagPoint"));
            requestInfo.OkCashBagVAccount = GetParamValue(value, "OkCashBagVAccount");
            requestInfo.OkCashBagAcntNo = GetParamValue(value, "OkCashBagAcntNo");
            requestInfo.SOilPoint = Util.GetSafeInt(GetParamValue(value, "SOilPoint"));
            requestInfo.SOilVAccount = GetParamValue(value, "SOilVAccount");
            requestInfo.SOilAcntNo = GetParamValue(value, "SOilAcntNo");
            requestInfo.CulturePoint = Util.GetSafeInt(GetParamValue(value, "CulturePoint"));
            requestInfo.CultureVAccount = GetParamValue(value, "CultureVAccount");
            requestInfo.CultureAcntNo = GetParamValue(value, "CultureAcntNo");
            requestInfo.CultureCustId = GetParamValue(value, "CultureCustID");
            requestInfo.CultureUserId = GetParamValue(value, "CultureUserID");
            requestInfo.CultureHashNo = GetParamValue(value, "CultureHashNo");
            requestInfo.DreamCash = Util.GetSafeInt(GetParamValue(value, "DreamCash"));
            requestInfo.DreamVAccount = GetParamValue(value, "DreamVAccount");
            requestInfo.DreamAcntNo = GetParamValue(value, "DreamAcntNo");
            requestInfo.DreamCustId = GetParamValue(value, "DreamCustID");
            requestInfo.DreamPassWd = GetParamValue(value, "DreamPassWD");
            requestInfo.DreamSocialNo = GetParamValue(value, "DreamSocialNo");
            requestInfo.PointParkPoint = Util.GetSafeInt(GetParamValue(value, "PointParkPoint"));
            requestInfo.PointparkVAccount = GetParamValue(value, "PointparkVAccount");
            requestInfo.PointparkAcntNo = GetParamValue(value, "PointparkAcntNo");
            requestInfo.PointparkUsersn = GetParamValue(value, "PointparkUsersn");
            requestInfo.PointparkAuthno = GetParamValue(value, "PointparkAuthno");
            requestInfo.OkCashBagCardNo = GetParamValue(value, "OkCashBagCardNo");
            requestInfo.OkCashBagPassWd = GetParamValue(value, "OkCashBagPassWd");
            requestInfo.SOilCardNo = GetParamValue(value, "SOilCardNo");
            requestInfo.SOilPassWd = GetParamValue(value, "SOilPassWd");
            requestInfo.GdscCd = GetParamValue(value, "gdsc_cd");

            requestInfo.CurrentJaehuID = GetParamValue(value, "current_jaehuid");

            #endregion

            return requestInfo;
        }
Пример #7
0
        private PaymentRequestInfoT GetpaymentParam()
        {
            PaymentRequestInfoT paymentParam = new PaymentRequestInfoT();

            #region 값 입력

            paymentParam.ShopOrder = "MULTI_ORDER";
            paymentParam.Mode = "basket_order";
            paymentParam.ItemNo = "178809718,167036161";
            paymentParam.JaehuID = ",,";
            paymentParam.PolicyNo = ",,";
            paymentParam.TotalAuthMoney = (decimal)27900;
            paymentParam.PaypalToken = "";
            paymentParam.PaypalNo = "";
            paymentParam.SaveFlag = "";
            paymentParam.BibitNo = 0;
            paymentParam.PayMethod = "";
            paymentParam.GlinkNation = "KR,KR,";
            paymentParam.GlinkSellPrice = "0.00,0.00,";
            paymentParam.GlinkDelFee = "0.00,0.00,";
            paymentParam.GlinkAddInfo = ",,";
            paymentParam.SelectedOrderIdxs = "1100057438,1100057431,";
            paymentParam.TcashTid = "";
            paymentParam.SettleLimitKey = "";
            paymentParam.SafecallUse = "";
            paymentParam.OkcashbagSaveYN = "";
            paymentParam.OuterOrderNos = "NaN,NaN";
            paymentParam.PartnerGiftMessage = "";
            paymentParam.PartnerGiftMessageReceiver = "";
            paymentParam.PartnerGiftMessageSender = "";
            paymentParam.GoodsType = "";
            paymentParam.InstBypass = "******";
            paymentParam.CardCash = "CASH";
            paymentParam.OrderType = "normal";
            paymentParam.OrderPrice = "16900,9000";
            paymentParam.SelItemPrice = "0,0";
            paymentParam.OrderCounts = "1,1";
            paymentParam.AbroadYN = "0";
            paymentParam.OrderInfoPbid = "B341FFEF-9494-4AA9-87C9-1FA647190F4A";
            paymentParam.BasketPid = "B341FFEF-9494-4AA9-87C9-1FA647190F4A";
            paymentParam.DeliveryGoodsYN = "";
            paymentParam.Oaddress1_2 = "";
            paymentParam.Oaddress2_2 = "";
            paymentParam.ReceiverName_2 = "";
            paymentParam.ReceiverPhoneNo1_2 = "";
            paymentParam.ReceiverPhoneNo2_2 = "";
            paymentParam.ReceiverPhoneNo3_2 = "";
            paymentParam.ReceiverHpNo1_2 = "";
            paymentParam.ReceiverHpNo2_2 = "";
            paymentParam.ReceiverHpNo3_2 = "";
            paymentParam.OzipCode_2 = "";
            paymentParam.NationIsocode_2 = "";
            paymentParam.PaymentMethod = "";
            paymentParam.SenderName_2 = "";
            paymentParam.State = "";
            paymentParam.OzipCode1_2 = "";
            paymentParam.OzipCode2_2 = "";
            paymentParam.Oaddress1 = "서울 강남구 역삼동";
            paymentParam.Oaddress2 = "에 살아요";
            paymentParam.ReceiverName = "꽃미남";
            paymentParam.ReceiverPhoneNo1 = "02";
            paymentParam.ReceiverPhoneNo2 = "222";
            paymentParam.ReceiverPhoneNo3 = "3333";
            paymentParam.ReceiverHpNo1 = "010";
            paymentParam.ReceiverHpNo2 = "1111";
            paymentParam.ReceiverHpNo3 = "2222";
            paymentParam.OzipCode1 = "135";
            paymentParam.OzipCode2 = "080";
            paymentParam.IsRcvMail = "Y";
            paymentParam.IsRcvSMS = "";
            paymentParam.Interval = "3,3";
            paymentParam.BuyType = "now";
            paymentParam.IsCorpCard = "N";
            paymentParam.TradWay = "T6,T6";
            paymentParam.BuyerName = "";
            paymentParam.BuyerTelNo1 = "";
            paymentParam.BuyerTelNo2 = "";
            paymentParam.BuyerTelNo3 = "";
            paymentParam.BuyerEmail = "";
            paymentParam.BuyerSsn1 = "";
            paymentParam.BuyerSsn2 = "";
            paymentParam.Pwd1 = "";
            paymentParam.CardNumber1 = "";
            paymentParam.CardNumber2 = "";
            paymentParam.CardNumber3 = "";
            paymentParam.CardNumber4 = "";
            paymentParam.CardYear = "00";
            paymentParam.CardMonth = "00";
            paymentParam.CardPwd = "";
            paymentParam.SocialNo2 = "";
            paymentParam.Gbank = Util.GetSafeInt("14");
            paymentParam.GbankPaypal = Util.GetSafeInt("10000");
            paymentParam.GbankGubun = "Paypal";
            paymentParam.ForeignMoney = (decimal)23.95;
            paymentParam.DepositName = "김기영";
            paymentParam.TaxIssueYN = "Y,Y";
            paymentParam.CashIssueYN = "Y,Y";
            paymentParam.RequestTax = "";
            paymentParam.TaxRegNo = "";
            paymentParam.TaxCompanyName = "";
            paymentParam.TaxBoss = "";
            paymentParam.TaxAddress = "";
            paymentParam.TaxRcvAddress = "";
            paymentParam.TaxZipCode = "";
            paymentParam.TaxCategory = "";
            paymentParam.TaxKind = "";
            paymentParam.TaxEmail = "";
            paymentParam.TaxPhone = "";
            paymentParam.TaxMemo = "";
            paymentParam.TaxChargeTeam = "";
            paymentParam.TaxChargeName = "";
            paymentParam.CashUseType = "";
            paymentParam.CashRegNo = "";
            paymentParam.CashName = "";
            paymentParam.CashPhone = "";
            paymentParam.CashEmail = "";
            paymentParam.CashIdFlag = "";
            paymentParam.PosShopCd = "GE,BS";
            paymentParam.PosClassCd = "111111111,111111111";
            paymentParam.PosClassKind = "T,T";
            paymentParam.OrderMemoCount = 0;
            paymentParam.ItemCount = 2;
            paymentParam.DeliveryFee = "0,2000";
            paymentParam.DeliveryGroupNo = "7325038,3426450";
            paymentParam.RealDeliveryFee = "0,2000";
            paymentParam.RealDeliveryGroupNo = "7325038,3426450";
            paymentParam.RealCostPrice = "0,0";
            paymentParam.RealCostBasisNo = ",";
            paymentParam.RealCostWhoFee = ",";
            paymentParam.RealCostResult = "0,0";
            paymentParam.RealCostPriceYN = "N,N";
            paymentParam.Sid = "0,0";
            paymentParam.SelInfo = "";
            paymentParam.AuthSdt = "";
            paymentParam.AuthEdt = "";
            paymentParam.PayAuthSeq = Util.GetSafeInt("52018323");
            paymentParam.CcExpMonth = "";
            paymentParam.CcExpYear = "";
            paymentParam.GdSelNo = "125421920325125752,125421920325112415";
            paymentParam.RealDeliveryInfo = "E7F872DCD242D6525054FF19CD8364E22684F157388E59ACA0BEBD4679A41D86BA7ABA920650F50D25787E0966F574C7C210850E608162126D05D02A52DD75FC";
            paymentParam.RealDeliveryFeeInfo = "E7F872DCD242D6525054FF19CD8364E23ED8645D9BA9F73F7440FAFD4D5418E5FED7033892E1F653C09FA90CFF9D9C8D";
            paymentParam.CouponNo = "";
            paymentParam.PlusDiscountKey = "F9QbtlemZvfX0R01VHX0RzAsLV9JbVzpcW502NvdMCx/MCwwLH8wLDAsfzAsMCx/MCwwLH8xNTExNjEyMTc3ODE4f3Blc2VudH8xMDkzNDE3MTZ/";
            paymentParam.PlusDiscountChkVal = "1511612177818";
            paymentParam.SetCostCountKey = "F9TZ5mbDAsfSWR013XQ29zAsLV8wLRfzdXlfF9LZMCx/MCwwLH8wLDAsfzAsMCx/MCwwLH82MTIxNzc4MTgxNTExf3Blc2VudH8xMDkzNDE3MTZ/";
            paymentParam.SetCostCountChkVal = "6121778181511";
            paymentParam.PackCostCountKey = "F9QYluZCwwLX0R01mWX0NH8wLV9/MNrvc2V53RfSLDAsfzAsMCx/MCwwLH8wLDAsfzAsMCx/NjEyMTc3ODE4MTUxMX9wZXNlbnR/MTA5MzQxNzE2fw==";
            paymentParam.PackCostCountChkVal = "6121778181511";
            paymentParam.DelMemo0 = "";
            paymentParam.DelMemo = "";
            paymentParam.KvpQuota = "";
            paymentParam.KvpSessionkey = "";
            paymentParam.KvpEncdata = "";
            paymentParam.KvpCardcode = "";
            //paymentParam.AucNo = "0,0";
            //paymentParam.AuctionBidPrice = "";
            //paymentParam.AuctionBidAmt = "";
            //paymentParam.AuctionSellerCustNo = "";
            paymentParam.BidNo = "";
            paymentParam.AucOrderWayKind = "";
            paymentParam.Xid = "";
            paymentParam.Eci = "";
            paymentParam.Cavv = "";
            paymentParam.VirtualCardKind1 = "";
            paymentParam.VirtualCardKind2 = "";
            paymentParam.VirtualCardKind3 = "";
            paymentParam.VirtualCardKind4 = "";
            paymentParam.VirtualCardKind5 = "";
            paymentParam.InventorySeqNo = "0,0";
            paymentParam.InventorySeqNoOpt = "0,0";
            paymentParam.OncreditYN = "";
            paymentParam.Vaccount = "10981564041126";
            paymentParam.VacntNo = "508785422";
            paymentParam.TransTransactionConfirmNo = "";
            paymentParam.TransBankNo = "";
            paymentParam.TransCardCash = "";
            paymentParam.TransOrderNo = "";
            paymentParam.TransSeqNo = "";
            paymentParam.FreeInterestNo = Util.GetSafeInt("");
            paymentParam.HalbuType = "";
            paymentParam.Installmonth = Util.GetSafeInt("0");
            paymentParam.MpiInstallmonth = "";
            paymentParam.IspInstallmonth = "";
            paymentParam.ReceiveMailYn = "";
            paymentParam.ReceiveSmsYN = "";
            paymentParam.RealDealerCostBasisNo = "0,0";
            paymentParam.RealDealerCostPrice = "0,0";
            paymentParam.SellerCustNo = "101102730,115559377";
            paymentParam.ShoppingGuideNo = "0,0";
            paymentParam.ReservationRsvNo = Util.GetSafeInt("");
            paymentParam.TotalSticker = Util.GetSafeInt("0");
            paymentParam.SplitSticker = "0,0";
            paymentParam.SplitStickerWhoFee = "";
            paymentParam.Jehugoodscode = "";
            paymentParam.Jehuordercnts = "";
            paymentParam.Jehuorderno = "";
            paymentParam.Jehuorderltype = "";
            paymentParam.Jehuorderatype = "";
            paymentParam.PaymentName = "농협";
            paymentParam.HidBranchInfo = "";
            paymentParam.InterestGroupNo = "0,0";
            paymentParam.GiftPackYN = "N,N";
            paymentParam.GiftShopYN = "N,N";
            paymentParam.SpecTransFee = "0.00,0.00";
            paymentParam.CellphoneSessionkey = "";
            paymentParam.CellphoneAuthNo = "";
            paymentParam.CellphoneAuthKind = "";
            paymentParam.CellphoneAuthHpNo = "";
            paymentParam.ChanceKind = "N,N";
            paymentParam.ChanceAmount = "0,0";
            paymentParam.ReserveOrderYN = "";
            paymentParam.SendGiftYN = "N";
            paymentParam.GiftReceiverCustNo = "";
            paymentParam.GiftReceiverName = "";
            paymentParam.GiftReceiverHpNo = "";
            paymentParam.GiftReceiverID = "";
            paymentParam.GiftReceiverEmail = "";
            paymentParam.GiftMemo = "";
            paymentParam.SenderInfoKindI = "";
            paymentParam.SenderInfoKindE = "";
            paymentParam.SenderInfoKindH = "";
            paymentParam.GiftMessageKind = "G";
            paymentParam.SendGiftTokenYN = "";
            paymentParam.GiftReceiverCustNoToken = "";
            paymentParam.GiftReceiverNmToken = "";
            paymentParam.GiftReceiverHpToken = "";
            paymentParam.GiftReceiverIdToken = "";
            paymentParam.GiftReceiverEmailToken = "";
            paymentParam.GiftMemoToken = "";
            paymentParam.SendGiftWay = "";
            paymentParam.GiftSenderName = "김기영";
            paymentParam.GiftSenderID = "";
            paymentParam.GiftSenderEmail = "";
            paymentParam.GiftSenderHpNo = "";
            paymentParam.CouponGiftGroupNo = "";
            paymentParam.ReceiverName_1 = "";
            paymentParam.OZipCode1_1 = "";
            paymentParam.OZipCode2_1 = "";
            paymentParam.OAddress1_1 = "";
            paymentParam.OAddress2_1 = "";
            paymentParam.ReceiverPhoneNo1_1 = "";
            paymentParam.ReceiverPhoneNo2_1 = "";
            paymentParam.ReceiverPhoneNo3_1 = "";
            paymentParam.ReceiverHpNo1_1 = "";
            paymentParam.ReceiverHpNo2_1 = "";
            paymentParam.ReceiverHpNo3_1 = "";
            paymentParam.WishPickupDt = "";
            paymentParam.TransMemo = "";
            paymentParam.TransGoodsinfo = "";
            paymentParam.CsdUseYN = "N";
            paymentParam.CsdGdNo = "";
            paymentParam.CsdGdSelNo = "";
            paymentParam.CsdOrderCount = "";
            paymentParam.CsdCostBasisNo = "";
            paymentParam.CsdCostPrice = "";
            paymentParam.TotalPayPrice = 27900;
            paymentParam.GBankMoney = 0;
            paymentParam.GBankVAccount = "";
            paymentParam.GBankAcntNo = "";
            paymentParam.GBankMileage = 0;
            paymentParam.GBankMileageVAccount = "";
            paymentParam.GBankMileageAcntNo = "";
            paymentParam.GBankBcash = 0;
            paymentParam.GBankBcashVAccount = "";
            paymentParam.GBankBcashAcntNo = "";
            paymentParam.OkCashBagPoint = 0;
            paymentParam.OkCashBagVAccount = "";
            paymentParam.OkCashBagAcntNo = "";
            paymentParam.SOilPoint = 0;
            paymentParam.SOilVAccount = "";
            paymentParam.SOilAcntNo = "";
            paymentParam.CulturePoint = 0;
            paymentParam.CultureVAccount = "";
            paymentParam.CultureAcntNo = "";
            paymentParam.CultureCustId = "";
            paymentParam.CultureUserId = "";
            paymentParam.CultureHashNo = "";
            paymentParam.DreamCash = 0;
            paymentParam.DreamVAccount = "";
            paymentParam.DreamAcntNo = "";
            paymentParam.DreamCustId = "";
            paymentParam.DreamPassWd = "";
            paymentParam.DreamSocialNo = "";
            paymentParam.PointParkPoint = 0;
            paymentParam.PointparkVAccount = "";
            paymentParam.PointparkAcntNo = "";
            paymentParam.PointparkUsersn = "";
            paymentParam.PointparkAuthno = "";
            paymentParam.OkCashBagCardNo = "";
            paymentParam.OkCashBagPassWd = "";
            paymentParam.SOilCardNo = "";
            paymentParam.SOilPassWd = "";
            paymentParam.GdscCd = "300017700,300020499";
            paymentParam.OrderSiteInfo = "KOR,KOR,";
            paymentParam.RemoteAddress = "10.238.130.14";
            paymentParam.MemberType = "MEM";
            paymentParam.CustNo = "109341716";
            paymentParam.CurrentJaehuID = "";

            #endregion

            return paymentParam;
        }
Пример #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>
        /// 파라메터에 대한 Validateion
        /// </summary>
        /// <param name="requestInfo"></param>
        /// <returns></returns>
        private void ValidateRequestInfo(PaymentRequestInfoT requestInfo)
        {
            if (requestInfo == null)
            {
                throw new ArgumentNullException("주문 정보가 올바르지 않습니다");
            }

            // request
        }
Пример #11
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
        }