spc-kiosk-pb/Service/BsvPayment/PointMobileCom.cs
2019-06-16 14:12:09 +09:00

940 lines
51 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections;
using System.Text;
using Cosmos.UserFrame;
using Cosmos.ServiceProvider;
using Cosmos.Common;
using Cosmos.CommonManager;
using System.Data;
/*-----------------------------------------------------------------------------------------------*/
// 설 명 : 통신사(SKT,KT,LGT) 할인
// 작 성 자 :
// 변경 이력 :
/*-----------------------------------------------------------------------------------------------*/
namespace Cosmos.Service
{
class PointMobileCom : PaymentBase, IPaymentUs
{
public PointMobileCom()
{
}
#region SearchPayment
/// <summary>
/// 결제 조회
/// </summary>
/// <param name="aParam"></param>
/// <param name="aRet"></param>
/// <returns></returns>
public string SearchPayment(string[] aParam, ref string[] aRet)
{
string sRet = UserCom.RST_ERR;
string sPosMenuKey = "", sInPutType = "", sInPutData = "", sInEncData = "";
try
{
sPosMenuKey = aParam[0]; // 메뉴키
sInPutType = aParam[1]; // 입력구분
sInPutData = aParam[2]; // 입력데이터
sInEncData = aParam[3]; // 카드데이터
double nPayAmt = CmUtil.DoubleParse(aParam[4]); // 대상금액
string sPointType = GetMenuKeyToPointType(sPosMenuKey);
m_cPayItem = new Column.TR_PAYMENT.DATA(); // 결과 저장 변수 생성
m_cPayItem.PAY_WAY_CD = GetMenuKeyToPayWayCd(sPosMenuKey);
m_cPayItem.PAY_DTL_CD_01 = GetMenuKeyToPayDtlCd(sPosMenuKey);
//#20170906 T페이 고도화 작업 phj, start
//기존
//sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.NORMAL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_QRY_A, sPointType, sInPutType, sInPutData, sInEncData, nPayAmt, "", "", "");
//변경
sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.NORMAL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_QRY_A, sPointType, sInPutType, sInPutData, sInEncData, nPayAmt, "", "", "", "");
//#20170906 T페이 고도화 작업 phj, end
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
CmUtil.ZeroFillClear(ref aParam);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
#endregion
#region GetPayment
/// <summary>
/// 결제 정보 획득
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public object GetPayment(string[] aParam)
{
return m_cPayItem;
}
#endregion
#region SetPayment
/// <summary>
/// 결제 등록(통신사 포인트 할인)
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public string SetPayment(string[] aParam)
{
string sProductCode = "";
string sTermGradeCD = "";
string sRet = UserCom.RST_ERR;
string sPosMenuKey = "", sInPutType = "", sInPutData = "", sInEncData = "";
double nDestAmt = 0;
//#20170906 T페이 고도화 작업 phj, start
string sInCardData = "";
//#20170906 T페이 고도화 작업 phj, end
try
{
m_cPayItem = new Column.TR_PAYMENT.DATA(); // 결과 저장 변수 생성
if (aParam.Length > 0 && aParam[0] == PosConst.POS_CAT_MASTER.TRAN_TYPE) //단말기승인
{
nDestAmt = CmUtil.DoubleParse(aParam[3]); // 대상금액
m_cPayItem.PAY_WAY_CD = GetMenuKeyToPayWayCd(aParam[12]);
m_cPayItem.PAY_DTL_CD_01 = GetMenuKeyToPayDtlCd(aParam[12]);
if (aParam[12] == PosKey.MENU_KEY.SKT)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_SKT_AGREE;
aParam[9] = "1001";
//#20170906 T페이 고도화 작업 phj, start
//Tpay 어플에서 OTB 앞자리가 292 : t멤버십, 294 통합결제, 297 : 일반결제로 구분
if (aParam[14] != "")
{
if ((aParam[14].Substring(0, 3) == "294") || (aParam[14].Substring(0, 3) == "292") || (aParam[14].Substring(0, 3) == "297"))
{
sInCardData = aParam[14];
}
}
//#20170906 T페이 고도화 작업 phj, end
}
else if (aParam[12] == PosKey.MENU_KEY.KT)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_AGREE;
}
else if (aParam[12] == PosKey.MENU_KEY.KT_VIP)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_AGREE;
if (m_cPosStatus.Base.BrandCd == PosConst.MST_BRAND_CODE.BR_BR)
{
// BR VIP 1 3,800
aParam[9] = "1";
}
else if (m_cPosStatus.Base.BrandCd == PosConst.MST_BRAND_CODE.BR_DD)
{
// DD VIP 2 100%
aParam[9] = "2";
}
}
else if (aParam[12] == PosKey.MENU_KEY.LGT)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_LGT_AGREE;
}
//#20180413 웰컴카드 신규기능 추가 start,phj
else if (aParam[12] == PosKey.MENU_KEY.WELCOMECARD_DC)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_WCC_AGREE;
}
//#20180413 웰컴카드 신규기능 추가 end,phj
else if (aParam[12] == PosKey.MENU_KEY.KT_DOUBLE)
{
aParam[1] = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_AGREE;
// KT 멤버십 더블할인 시즌2 => 8888
aParam[9] = "8888";
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START
if (aParam[15] != "")
{
sProductCode = aParam[15];
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END
sRet = CatExecuteIrt(aParam[1], aParam);
if (sRet != UserCom.RST_OK) return sRet;
}
else
{
sPosMenuKey = aParam[0]; // 메뉴키
sInPutType = aParam[1]; // 입력구분
sInPutData = aParam[2]; // 입력데이터
sInEncData = aParam[3]; // 카드데이터
nDestAmt = CmUtil.DoubleParse(aParam[4]); // 대상금액
string sApprDate = aParam[5]; // 승인일자
string sApprNo = aParam[6]; // 승인번호
if (sApprDate.Length == 8) sApprDate.Substring(2, 6); // 승인일자(YYMMDD)
m_cPayItem.PAY_WAY_CD = GetMenuKeyToPayWayCd(sPosMenuKey);
m_cPayItem.PAY_DTL_CD_01 = GetMenuKeyToPayDtlCd(sPosMenuKey);
string sPointType = GetMenuKeyToPointType(sPosMenuKey);
// 상품 코드 설정
if (sPosMenuKey == PosKey.MENU_KEY.KT_VIP)
{
if (m_cPosStatus.Base.BrandCd == PosConst.MST_BRAND_CODE.BR_BR)
{
// BR VIP 1 3,800
sProductCode = "1";
}
else if (m_cPosStatus.Base.BrandCd == PosConst.MST_BRAND_CODE.BR_DD)
{
// DD VIP 2 100%
sProductCode = "2";
}
}
else if (sPosMenuKey == PosKey.MENU_KEY.SKT)
{
sProductCode = "1001";
//#20170906 T페이 고도화 작업 phj, start
//Tpay 어플에서 OTB 앞자리가 292 : t멤버십, 294 통합결제, 297 : 일반결제로 구분
if (aParam[14] != "")
{
if ((aParam[14].Substring(0, 3) == "294") || (aParam[14].Substring(0, 3) == "292") || (aParam[14].Substring(0, 3) == "297"))
{
sInCardData = aParam[14];
}
}
//#20170906 T페이 고도화 작업 phj, end
}
else if (sPosMenuKey == PosKey.MENU_KEY.KT_DOUBLE)
{
// KT 멤버십 더블할인 시즌2 => 8888
sProductCode = "8888";
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START
if (aParam[15] != "")
{
sProductCode = aParam[15];
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END
string sTrType = (m_cTrnStatus.Head.TradeDiv == ItemConst.TRAN_DIV.NORMAL) ? PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_A : PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_C;
//#20170906 T페이 고도화 작업 phj, start
//기존
//sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.NORMAL, sTrType, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode);
//변경
sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.NORMAL, sTrType, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode, sInCardData);
//#20170906 T페이 고도화 작업 phj, end
if (sRet != UserCom.RST_OK) return sRet;
}
// 결제 아이템 추가
ArrayList alPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM); // 결제 내역 받아 오기
m_cPayItem.SEQ = alPayItem.Count + 1;
alPayItem.Add(m_cPayItem);
if (m_cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.DC)
{
// 상품아이템에 할인금액 설정
if (sPosMenuKey == PosKey.MENU_KEY.KT_VIP || sPosMenuKey == PosKey.MENU_KEY.KT_DOUBLE)
SetPluMaxOneCoopCardDcAmount(m_cPayItem.PAY_WAY_CD + m_cPayItem.PAY_DTL_CD_01, sTermGradeCD, m_cPayItem.PAY_AMT);
else
SetPluDiscountAmount(-1, m_cPayItem.PAY_WAY_CD + m_cPayItem.PAY_DTL_CD_01, "", m_cPayItem.PAY_AMT);
}
m_cDataService.UpdatePluAmount(); // 상품 합계금액 계산(거래해더)
m_cDataService.UpdatePayAmount(); // 결제 금액 재 계산 처리
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
CmUtil.ZeroFillClear(ref aParam);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
#endregion
#region CancelPayment
/// <summary>
/// 결제 취소
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public string CancelPayment(string[] aParam)
{
string sRet = UserCom.RST_ERR;
string sInPutType = "", sInPutData = "", sInEncData = "";
try
{
if (m_cTrnStatus.Head.TradeDiv != ItemConst.TRAN_DIV.NORMAL) return sRet;
int nPayRow = CmUtil.IntParse(aParam[0]); // 취소할 행번호
// 결제 내역 받아 오기
ArrayList alPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM);
m_cPayItem = (Column.TR_PAYMENT.DATA)alPayItem[nPayRow];
if (m_cPayItem.OCCUR_ENTRY_08.ToString() == ItemConst.PAY_APP_DIV.CAT_TERMINAL)
{
string[] m_aParam = new string[16];
//InParam
// 0.전문구분,1.거래유형, 2.할부개월, 3.승인금액 , 4.봉사료, 5.세금, 6.원승인번호, 7.원거래일자, 8.포인트거래구분, 9.상품코드,
//10.전표인쇄여부,11.추가항목,12.제휴할인코드,13.제휴할인금액,14.예비1
string sAppId = "";
if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT)
{
switch (m_cPayItem.PAY_DTL_CD_01)
{
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF:
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP:
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_CANCEL;
break;
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_LGT_CANCEL;
break;
//#20180413 웰컴카드 신규기능 추가 start,phj
case ItemConst.TR_ITEM_ID.MOBILE_COM.WELCOMECARD:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_WCC_CANCEL;
break;
//#20180413 웰컴카드 신규기능 추가 end,phj
default:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_SKT_CANCEL;
break;
}
}
m_aParam[0] = PosConst.POS_CAT_MASTER.TRAN_TYPE;
m_aParam[1] = sAppId;
m_aParam[2] = "00";
m_aParam[3] = m_cPayItem.AMT_ENTRY_10.ToString();
m_aParam[4] = "0"; //봉사료
m_aParam[5] = "0"; //세금
m_aParam[6] = m_cPayItem.OCCUR_ENTRY_02;
m_aParam[7] = m_cPayItem.OCCUR_ENTRY_03;
m_aParam[8] = "";
m_aParam[9] = "";
m_aParam[10] = "";
m_aParam[11] = "";
m_aParam[12] = "";
m_aParam[13] = "";
m_aParam[14] = "";
m_aParam[15] = "";
sRet = CatExecuteIrt(m_aParam[1], m_aParam);
if (sRet != UserCom.RST_OK) return sRet;
}
else
{
// SKT 통신사 취소시 상품코드 1001 전송 해야함(2017.06.01)
string sProductCode = "";
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START - 20180514
//기존
//if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT && m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT) sProductCode = "1001";
//변경
if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT &&
(m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE))
{
sProductCode = m_cPayItem.OCCUR_ENTRY_14; // 상품코드
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END - 20180514
sInPutType = m_cPayItem.OCCUR_ENTRY_05; // 입력구분
sInPutData = m_cPayItem.OCCUR_ENTRY_01; // 입력데이터
sInEncData = m_cPayItem.CanFiller1; // 카드데이터
double nDestAmt = m_cPayItem.AMT_ENTRY_10; // 대상금액
string sApprDate = m_cPayItem.OCCUR_ENTRY_03; // 승인일자
string sApprNo = m_cPayItem.OCCUR_ENTRY_02; // 승인번호
string sPointType = GetPayDtlCdToPointType(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01);
//#20170906 T페이 고도화 작업 phj, start
//기존
//sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.CANCEL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_C, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode);
//변경
sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.CANCEL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_C, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode, "");
//#20170906 T페이 고도화 작업 phj, end
if (sRet != UserCom.RST_OK) return sRet;
}
if (m_cPayItem.PAY_DTL_CD_05 == PosConst.PAY_DC_TYPE.DC)
{
ClearPluDiscountAmount(m_cPayItem.PAY_WAY_CD + m_cPayItem.PAY_DTL_CD_01, ""); // 할인금액 삭제
}
m_cPayItem.CANCEL_DIV = PosConst.CANCEL_DIV.CANCEL;
m_cDataService.UpdatePluAmount(); // 상품 합계금액 계산(거래해더)
m_cDataService.UpdatePayAmount(); // 결제 금액 재 계산 처리
// 여전법 대응 ///////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref m_cPayItem.CanFiller1);
//////////////////////////////////////////////////////////////////////////////////
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
CmUtil.ZeroFillClear(ref aParam);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
#endregion
#region RefundPayment
/// <summary>
/// 결제 반품
/// </summary>
/// <param name="aParam"></param>
/// <returns></returns>
public string RefundPayment(string[] aParam)
{
string sRet = UserCom.RST_ERR;
string sInPutType = "", sInPutData = "", sInEncData = "";
//#20171020 log 추가
UserLog.WriteLogFile(UserCom.LOG_IOS, System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()",
" pointmobilecom - 거래구분 : " + m_cTrnStatus.Head.TradeDiv);
try
{
int nPayRow = CmUtil.IntParse(aParam[0]); // 취소할 행번호
// 결제 내역 받아 오기
ArrayList alPayItem = (ArrayList)StateObject.GetItemObject(Column.TR_PAYMENT.ITEM);
m_cPayItem = (Column.TR_PAYMENT.DATA)alPayItem[nPayRow];
if (m_cPayItem.OCCUR_ENTRY_08.ToString() == ItemConst.PAY_APP_DIV.CAT_TERMINAL)
{
string[] m_aParam = new string[15];
//InParam
// 0.전문구분,1.거래유형, 2.할부개월, 3.승인금액 , 4.봉사료, 5.세금, 6.원승인번호, 7.원거래일자, 8.포인트거래구분, 9.상품코드,
//10.전표인쇄여부,11.추가항목,12.제휴할인코드,13.제휴할인금액,14.예비1
string sAppId = "";
if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT)
{
switch (m_cPayItem.PAY_DTL_CD_01)
{
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF:
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP:
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_CANCEL;
break;
case ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_LGT_CANCEL;
break;
//#20180413 웰컴카드 신규기능 추가 start,phj
case ItemConst.TR_ITEM_ID.MOBILE_COM.WELCOMECARD:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_WCC_CANCEL;
break;
//#20180413 웰컴카드 신규기능 추가 end,phj
default:
sAppId = PosConst.POS_CAT_MASTER.TRADE_ID.CAT_SKT_CANCEL;
break;
}
}
m_aParam[0] = PosConst.POS_CAT_MASTER.TRAN_TYPE;
m_aParam[1] = sAppId;
m_aParam[2] = "00";
m_aParam[3] = m_cPayItem.AMT_ENTRY_10.ToString();
m_aParam[4] = "0"; //봉사료
m_aParam[5] = "0"; //세금
m_aParam[6] = m_cPayItem.OCCUR_ENTRY_02;
m_aParam[7] = m_cPayItem.OCCUR_ENTRY_03;
m_aParam[8] = "";
m_aParam[9] = "";
m_aParam[10] = "";
m_aParam[11] = "";
m_aParam[12] = "";
m_aParam[13] = "";
m_aParam[14] = "";
sRet = CatExecuteIrt(m_aParam[1], m_aParam);
if (sRet != UserCom.RST_OK) return sRet;
}
else
{
// SKT 통신사 취소시 상품코드 1001 전송 해야함(2017.06.01)
string sProductCode = "";
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START - 20180514
//기존
//if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT && m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT) sProductCode = "1001";
//변경
if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT &&
(m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE))
{
sProductCode = m_cPayItem.OCCUR_ENTRY_14; // 상품코드
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END - 20180514
sInPutType = m_cPayItem.OCCUR_ENTRY_05; // 입력구분
sInPutData = m_cPayItem.OCCUR_ENTRY_01; // 입력데이터(마스킹)
sInEncData = m_cPayItem.CanFiller1; // 카드데이터(암호화)
if (m_cPayItem.OCCUR_ENTRY_08.ToString() != ItemConst.PAY_APP_DIV.NORMAL)
{
//WinManager.ConfirmMessage(MessageManager.GetErrorMessage(POS_MESSAGE.ERROR.MSG_0240));
m_cPayItem.OCCUR_ENTRY_06 = m_cPayItem.OCCUR_ENTRY_02; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = m_cPayItem.OCCUR_ENTRY_03; // 원승인일자
}
else
{
double nDestAmt = m_cPayItem.AMT_ENTRY_10; // 대상금액
string sApprDate = m_cPayItem.OCCUR_ENTRY_03; // 승인일자
string sApprNo = m_cPayItem.OCCUR_ENTRY_02; // 승인번호
string sPointType = GetPayDtlCdToPointType(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01);
//#20170906 T페이 고도화 작업 phj, start
//기존
//sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.CANCEL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_C, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode);
//변경
sRet = ExecutePointMobileComIrt(PosConst.CANCEL_DIV.CANCEL, PosConst.POS_VAN_MASTER.TRADE_ID.VAN_POT_DIS_C, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, sProductCode, "");
//#20170906 T페이 고도화 작업 phj, end
if (sRet != UserCom.RST_OK) return sRet;
}
}
// 여전법 대응 ///////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref m_cPayItem.CanFiller1);
//////////////////////////////////////////////////////////////////////////////////
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
CmUtil.ZeroFillClear(ref aParam);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
#endregion
#region SetMenualPayment
public string SetMenualPayment(string[] aParam)
{
throw new NotImplementedException();
}
#endregion
#region
/// <summary>
/// 통신사 할인 조회 실행
/// </summary>
//#20170906 T페이 고도화 작업 phj, start
//기존
//public string ExecutePointMobileComIrt(string sTradeDiv, string sTrType, string sPointType, string sInPutType, string sInPutData, string sInEncData, double nDestAmt, string sApprDate, string sApprNo, string sProductCode)
//변경
public string ExecutePointMobileComIrt(string sTradeDiv, string sTrType, string sPointType, string sInPutType, string sInPutData, string sInEncData, double nDestAmt, string sApprDate, string sApprNo, string sProductCode, string sTCardNo)
//#20170906 T페이 고도화 작업 phj, end
{
//#20171020 log 추가
UserLog.WriteLogFile(UserCom.LOG_IOS,
System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." +
System.Reflection.MethodBase.GetCurrentMethod().Name + "()",
" ExecutePointMobileComIrt : " +
"sTradeDiv :" + sTradeDiv +
"sTrType :" + sTrType +
"sPointType :" + sPointType +
"sInPutType :" + sInPutType +
"sApprDate :" + sApprDate +
"nDestAmt :" + nDestAmt +
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START - 20180514
"sProductCode :" + sProductCode
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END - 20180514
);
string sRet = UserCom.RST_ERR;
try
{
if (sInPutData.Length >= 6) sInPutData = sInPutData.Substring(0, 6).PadRight(sInPutData.Length, '*');
// 연습모드이면 연습 데이터 설정
if (m_cPosStatus.Base.TrainingFlag == "1" || m_cPosStatus.Mst.TestStorYn == "1" ) return SetTrainingData(sTrType, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo);
string sVanCD = GetPayDtlCdToVanCode(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 승인업체 코드 조회
if (sVanCD == "")
{
WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0563);
return sRet;
}
// 포인트 조회
string[] aIrtRsp = null;
sRet = ExecutePointIrt(sTradeDiv, m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, sVanCD, sTrType, sPointType, sInPutType, sInPutData, sInEncData, nDestAmt, sApprDate, sApprNo, "", sProductCode, "", "", "", ref aIrtRsp, "", "","",false);
if (sRet != UserCom.RST_OK) return sRet;
if (sTradeDiv == PosConst.CANCEL_DIV.NORMAL)
{
m_cPayItem.PAY_AMT = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResTrPoint]); // 사용포인트(할인금액)
// 통신사 할인 절상 처리(2017/04/06)
m_cPayItem.PAY_AMT = CmUtil.MathRounds(m_cPayItem.PAY_AMT, PosConst.MATH_ROUND.CEILING, -1);
m_cPayItem.PAY_DTL_CD_03 = "0"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.PAY; // 할인결제구분 (1:결제, 2:할인)
if (PosMstManager.GetMstPayDc(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, PosMst.MST_PAY_DC.DATA.PAY_DC_TYPE) == PosConst.PAY_DC_TYPE.DC)
{
m_cPayItem.PAY_DTL_CD_03 = "1"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.DC; // 할인결제구분 (1:결제, 2:할인)
}
m_cPayItem.AMT_ENTRY_01 = m_cPayItem.PAY_AMT; // 사용포인트(할인금액)
m_cPayItem.AMT_ENTRY_03 = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResSavePoint]); // 총포인트
m_cPayItem.AMT_ENTRY_04 = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResUsesPoint]); // 가용포인트(할인후결제금액)
m_cPayItem.AMT_ENTRY_05 = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResSavePoint]); // 잔여포인트
m_cPayItem.AMT_ENTRY_10 = nDestAmt;
//#20170906 T페이 고도화 작업 phj, start
//기존
//m_cPayItem.OCCUR_ENTRY_01 = sInPutData; // 카드번호
//변경
if (sTCardNo == "")
{
//TPAY 할인 및 결제 시
//마스킹 안된 데이터를 넣어주기 위해서
m_cPayItem.OCCUR_ENTRY_01 = sInPutData; // 카드번호
}
else
{
m_cPayItem.OCCUR_ENTRY_01 = sTCardNo; // 카드번호
}
//#20170906 T페이 고도화 작업 phj, end
m_cPayItem.OCCUR_ENTRY_02 = aIrtRsp[Column.POS_RES_POINT.SEQ.ResApprNo].Trim(); // 승인번호
m_cPayItem.OCCUR_ENTRY_03 = CmUtil.MidH(aIrtRsp[Column.POS_RES_POINT.SEQ.ResTrDate], 0, 6); // 승인일자
m_cPayItem.OCCUR_ENTRY_04 = CmUtil.MidH(aIrtRsp[Column.POS_RES_POINT.SEQ.ResTrDate], 6, 4); // 승인시간
m_cPayItem.OCCUR_ENTRY_05 = sInPutType; // 입력 구분
m_cPayItem.OCCUR_ENTRY_06 = sApprNo; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = sApprDate; // 원승인일자
m_cPayItem.OCCUR_ENTRY_08 = ItemConst.PAY_APP_DIV.NORMAL; //승인구분
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ START - 20180514
if (m_cPayItem.PAY_WAY_CD == ItemConst.TR_ITEM_ID.MOBILE_COM_POINT &&
(m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_SKT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KTF ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_LGT ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_VIP ||
m_cPayItem.PAY_DTL_CD_01 == ItemConst.TR_ITEM_ID.MOBILE_COM.MOBILE_KT_DOUBLE))
{
m_cPayItem.OCCUR_ENTRY_14 = sProductCode;
}
//#14231 KT 웰컴기프트 카드 기능 개발, PHJ END - 20180514
m_cPayItem.OCCUR_ENTRY_16 = sVanCD; // VAN 구분
m_cPayItem.OCCUR_ENTRY_18 = aIrtRsp[Column.POS_RES_POINT.SEQ.ResStoreNo]; // 가맹점번호
m_cPayItem.OCCUR_ENTRY_20 = GetPayDtlCdToPayDtlName(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 결제수단명
m_cPayItem.OCCUR_ENTRY_21 = GetPayDtlCdToCashBillYn(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 현금영수증 발행여부
m_cPayItem.CANCEL_DIV = ItemConst.PAY_CANCEL_DIV.NORMAL;
m_cPayItem.BILLSPR_NO = m_cTrnStatus.Sale.BillSplitNo; // 빌분리 번호
// 제휴카드번호 저장 후 직전취소시 사용(2017.08.28) -- START
m_cPayItem.CanFiller1 = sInEncData;
// 제휴카드번호 저장 후 직전취소시 사용(2017.08.28) -- END
//m_cPayItem.CanFiller1 = sInEncData;
m_cPayItem.HP_RESERVED = aIrtRsp[Column.POS_RES_POINT.SEQ.ResReserved].Trim(); // 예약필드
}
else
{
m_cPayItem.AMT_ENTRY_03 = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResSavePoint]); // 총포인트
m_cPayItem.AMT_ENTRY_05 = CmUtil.DoubleParse(aIrtRsp[Column.POS_RES_POINT.SEQ.ResSavePoint]); // 잔여포인트
m_cPayItem.OCCUR_ENTRY_01 = sInPutData; // 카드번호
m_cPayItem.OCCUR_ENTRY_02 = aIrtRsp[Column.POS_RES_POINT.SEQ.ResApprNo].Trim(); // 승인번호
m_cPayItem.OCCUR_ENTRY_03 = CmUtil.MidH(aIrtRsp[Column.POS_RES_POINT.SEQ.ResTrDate], 0, 6); // 승인일자
m_cPayItem.OCCUR_ENTRY_04 = CmUtil.MidH(aIrtRsp[Column.POS_RES_POINT.SEQ.ResTrDate], 6, 4); // 승인시간
m_cPayItem.OCCUR_ENTRY_05 = sInPutType; // 입력 구분
m_cPayItem.OCCUR_ENTRY_06 = sApprNo; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = sApprDate; // 원승인일자
}
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
/// <summary>
/// 연습 데이터 설정
/// </summary>
public string SetTrainingData(string sTrType, string sPointType, string sInPutType, string sInPutData, string sInEncData, double nDestAmt, string sApprDate, string sApprNo)
{
string sRet = UserCom.RST_ERR;
try
{
// 연습모드이면 연습 데이터 설정
string sVanCD = GetPayDtlCdToVanCode(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 승인업체 코드 조회
if (sVanCD == "")
{
WinManager.ErrorMessage(POS_MESSAGE.ERROR.MSG_0563);
return sRet;
}
double nDisAmt = m_cDataCommon.ExecTermCoopCmpPayDc(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, "", nDestAmt); // 제휴사 결제 할인 금액 계산
m_cPayItem.PAY_AMT = nDisAmt;
m_cPayItem.PAY_DTL_CD_03 = "0"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.PAY; // 할인결제구분 (1:결제, 2:할인)
if (PosMstManager.GetMstPayDc(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, PosMst.MST_PAY_DC.DATA.PAY_DC_TYPE) == PosConst.PAY_DC_TYPE.DC)
{
m_cPayItem.PAY_DTL_CD_03 = "1"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.DC; // 할인결제구분 (1:결제, 2:할인)
}
m_cPayItem.AMT_ENTRY_01 = m_cPayItem.PAY_AMT; // 사용포인트
m_cPayItem.AMT_ENTRY_03 = 0; // 총포인트
m_cPayItem.AMT_ENTRY_04 = 0; // 가용포인트(할인후결제금액)
m_cPayItem.AMT_ENTRY_05 = 0; // 잔여포인트
m_cPayItem.AMT_ENTRY_10 = nDestAmt;
m_cPayItem.OCCUR_ENTRY_01 = sInPutData; // 카드번호
m_cPayItem.OCCUR_ENTRY_02 = "99999999"; // 승인번호
m_cPayItem.OCCUR_ENTRY_03 = DateTime.Now.ToString("yyMMdd"); // 승인일자
m_cPayItem.OCCUR_ENTRY_04 = DateTime.Now.ToString("HHmm"); // 승인시간
m_cPayItem.OCCUR_ENTRY_05 = sInPutType; // 입력 구분
m_cPayItem.OCCUR_ENTRY_06 = sApprNo; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = sApprDate; // 원승인일자
m_cPayItem.OCCUR_ENTRY_08 = ItemConst.PAY_APP_DIV.NORMAL; //승인구분
m_cPayItem.OCCUR_ENTRY_16 = sVanCD; // VAN 구분
m_cPayItem.OCCUR_ENTRY_18 = ""; // 가맹점번호
m_cPayItem.OCCUR_ENTRY_20 = GetPayDtlCdToPayDtlName(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 결제수단명
m_cPayItem.OCCUR_ENTRY_21 = GetPayDtlCdToCashBillYn(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 현금영수증 발행여부
m_cPayItem.CANCEL_DIV = ItemConst.PAY_CANCEL_DIV.NORMAL;
m_cPayItem.BILLSPR_NO = m_cTrnStatus.Sale.BillSplitNo; // 빌분리 번호
//m_cPayItem.CanFiller1 = sInEncData;
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
//여전법 대응!
//////////////////////////////////////////////////////////////////////////////////
CmUtil.ZeroFillClear(ref sInPutData);
CmUtil.ZeroFillClear(ref sInEncData);
//////////////////////////////////////////////////////////////////////////////////
}
return sRet;
}
#endregion
#region CAT
/// <summary>
/// CAT 단말기 승인
/// </summary>
/// <param name="sAppType"></param>
/// <param name="aParam"></param>
/// <returns></returns>
public string CatExecuteIrt(string sAppType, string[] aParam)
{
string sRet = UserCom.RST_ERR;
string sSendData = string.Empty;
try
{
// 연습모드이면 연습 데이터 설정
if (m_cPosStatus.Base.TrainingFlag == "1" || m_cPosStatus.Mst.TestStorYn == "1") return SetTrainingData(sAppType, "", "", "999999*********", "", CmUtil.DoubleParse(aParam[3]), DateTime.Now.ToString("yyyyMMdd"), "99999999");
string sRecvdData = "";
string sAppLogDiv = "";
string sInputType = "";
if (sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_SKT_AGREE || sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_SKT_SEARCH ||
sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_AGREE || sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_KT_SEARCH ||
//#20180413 웰컴카드 신규기능 추가 start,phj
sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_WCC_AGREE || sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_WCC_SEARCH ||
//#20180413 웰컴카드 신규기능 추가 end,phj
sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_LGT_AGREE || sAppType == PosConst.POS_CAT_MASTER.TRADE_ID.CAT_LGT_SEARCH)
{
sAppLogDiv = PosConst.CANCEL_DIV.NORMAL;
}
else
{
sAppLogDiv = PosConst.CANCEL_DIV.CANCEL;
}
string[] aIrtDTLRsp = new string[Column.POS_RES_SPCN_CAT.LEN.Length];
//전문 송/수신
if (CatTerminalExecuteIrtCom(sAppType, sAppLogDiv, aParam, m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, ref aIrtDTLRsp, ref sRecvdData, ref sInputType) == false)
{
return sRet;
}
if (sAppLogDiv == PosConst.CANCEL_DIV.NORMAL)
{
m_cPayItem.PAY_AMT = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 0, 9)); // 사용포인트(할인금액)
// 통신사 할인 절상 처리(2017/04/06)
m_cPayItem.PAY_AMT = CmUtil.MathRounds(m_cPayItem.PAY_AMT, PosConst.MATH_ROUND.CEILING, -1);
m_cPayItem.PAY_DTL_CD_03 = "0"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.PAY; // 할인결제구분 (1:결제, 2:할인)
if (PosMstManager.GetMstPayDc(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01, PosMst.MST_PAY_DC.DATA.PAY_DC_TYPE) == PosConst.PAY_DC_TYPE.DC)
{
m_cPayItem.PAY_DTL_CD_03 = "1"; // 할인금액아이템적용여부 (0:미적용, 1:적용)
m_cPayItem.PAY_DTL_CD_05 = PosConst.PAY_DC_TYPE.DC; // 할인결제구분 (1:결제, 2:할인)
}
m_cPayItem.AMT_ENTRY_01 = m_cPayItem.PAY_AMT; // 사용포인트(할인금액)
m_cPayItem.AMT_ENTRY_03 = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 18, 9)); // 총포인트
m_cPayItem.AMT_ENTRY_04 = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 9, 9)); // 가용포인트(할인후결제금액)
m_cPayItem.AMT_ENTRY_05 = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 18, 9)); // 잔여포인트
m_cPayItem.AMT_ENTRY_10 = CmUtil.DoubleParse(aParam[3]);
m_cPayItem.OCCUR_ENTRY_01 = aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.CardBinData].Trim() + "*********"; // 카드번호
m_cPayItem.OCCUR_ENTRY_02 = aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppNo].Trim(); // 승인번호
m_cPayItem.OCCUR_ENTRY_03 = CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppDatatime], 0, 6); // 승인일자
m_cPayItem.OCCUR_ENTRY_04 = CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppDatatime], 6, 4); // 승인시간
m_cPayItem.OCCUR_ENTRY_05 = sInputType; // 입력 구분
m_cPayItem.OCCUR_ENTRY_06 = ""; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = ""; // 원승인일자
m_cPayItem.OCCUR_ENTRY_08 = ItemConst.PAY_APP_DIV.CAT_TERMINAL; // 승인구분
m_cPayItem.OCCUR_ENTRY_16 = GetPayDtlCdToVanCode(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // VAN 구분
m_cPayItem.OCCUR_ENTRY_18 = aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.FranchiseNo]; // 가맹점번호
m_cPayItem.OCCUR_ENTRY_20 = GetPayDtlCdToPayDtlName(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 결제수단명
m_cPayItem.OCCUR_ENTRY_21 = GetPayDtlCdToCashBillYn(m_cPayItem.PAY_WAY_CD, m_cPayItem.PAY_DTL_CD_01); // 현금영수증 발행여부
m_cPayItem.CANCEL_DIV = ItemConst.PAY_CANCEL_DIV.NORMAL;
m_cPayItem.BILLSPR_NO = m_cTrnStatus.Sale.BillSplitNo; // 빌분리 번호
}
else
{
m_cPayItem.AMT_ENTRY_03 = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 18, 9)); // 총포인트
m_cPayItem.AMT_ENTRY_05 = CmUtil.DoubleParse(CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AddItem], 18, 9)); // 잔여포인트
m_cPayItem.OCCUR_ENTRY_01 = aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.CardBinData].Trim() + "*********"; //카드번호
m_cPayItem.OCCUR_ENTRY_06 = m_cPayItem.OCCUR_ENTRY_02; // 원승인번호
m_cPayItem.OCCUR_ENTRY_07 = m_cPayItem.OCCUR_ENTRY_03; // 원승인일자
m_cPayItem.OCCUR_ENTRY_02 = aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppNo].Trim(); // 승인번호
m_cPayItem.OCCUR_ENTRY_03 = CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppDatatime], 0, 6); // 승인일자
m_cPayItem.OCCUR_ENTRY_04 = CmUtil.MidH(aIrtDTLRsp[Column.POS_RES_SPCN_CAT.SEQ.AppDatatime], 6, 4); // 승인시간
m_cPayItem.OCCUR_ENTRY_05 = sInputType; // 입력 구분
}
sRet = UserCom.RST_OK;
}
catch (Exception ex)
{
WinManager.ExceptionMessage(System.Reflection.Assembly.GetExecutingAssembly().ManifestModule.Name,
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "." + System.Reflection.MethodBase.GetCurrentMethod().Name + "()", ex.Message);
}
finally
{
CmUtil.ZeroFillClear(ref sSendData);
}
return sRet;
}
#endregion
}
}