결제 - 키움결제 적용 1차
This commit is contained in:
@@ -1015,6 +1015,15 @@ public interface BOOrdrMapper {
|
|||||||
* @param refundVO
|
* @param refundVO
|
||||||
*/
|
*/
|
||||||
public Integer selectSubsvcRefundAmt(BOOrdrRefundVO refundVO);
|
public Integer selectSubsvcRefundAmt(BOOrdrRefundVO refundVO);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 키움결제 GC_ORDER_PG_API_LOG 결과 조회
|
||||||
|
* @param payVO
|
||||||
|
* @return List<DataMap>
|
||||||
|
*/
|
||||||
|
public DataMap selectKiwoomPgApiLog(BOPayVO payVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -191,7 +191,11 @@ public class BOOrdrLogService {
|
|||||||
pgResult = false;
|
pgResult = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if ("kcp".equals(payVO.getPgCmpnyNm())) {
|
if("kiwoom".equals(payVO.getPgCmpnyNm())) {
|
||||||
|
resCd = "0000";
|
||||||
|
message = "결제 승인 성공";
|
||||||
|
//결제실패에 대한 응답은 없음
|
||||||
|
} else if ("kcp".equals(payVO.getPgCmpnyNm())) {
|
||||||
resCd = StringUtil.isNullToString(resultMap.get("res_cd"));
|
resCd = StringUtil.isNullToString(resultMap.get("res_cd"));
|
||||||
message = StringUtil.isNullToString(resultMap.get("res_msg"));
|
message = StringUtil.isNullToString(resultMap.get("res_msg"));
|
||||||
|
|
||||||
@@ -227,7 +231,7 @@ public class BOOrdrLogService {
|
|||||||
String logDtlCn = "";
|
String logDtlCn = "";
|
||||||
String operNm = "";
|
String operNm = "";
|
||||||
String dvCd = payVO.getDvCd();
|
String dvCd = payVO.getDvCd();
|
||||||
String setleTyCd = payVO.getSetleTyCd();
|
//String setleTyCd = payVO.getSetleTyCd();
|
||||||
if ("02".equals(dvCd)) { // 관리자 주문
|
if ("02".equals(dvCd)) { // 관리자 주문
|
||||||
String mbrNm = "";
|
String mbrNm = "";
|
||||||
if (payVO.getMbrNm() != null) {
|
if (payVO.getMbrNm() != null) {
|
||||||
@@ -311,7 +315,7 @@ public class BOOrdrLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문 로그 단순 등록
|
* 주문 로그 단순 등록
|
||||||
* @param pgApiLogVO
|
* @param logVO
|
||||||
*/
|
*/
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public void insertBOOrderLogRegist(BOOrderLogVO logVO, boolean result, String message) {
|
public void insertBOOrderLogRegist(BOOrderLogVO logVO, boolean result, String message) {
|
||||||
@@ -336,7 +340,7 @@ public class BOOrdrLogService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문 종기능 로그 등록
|
* 주문 종기능 로그 등록
|
||||||
* @param pgApiLogVO
|
* @param bellVO
|
||||||
*/
|
*/
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
public void insertBOOrderBellLogRegist(BOOrderLogVO bellVO) {
|
public void insertBOOrderBellLogRegist(BOOrderLogVO bellVO) {
|
||||||
|
|||||||
@@ -120,18 +120,12 @@ public class BOOrdrService{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BOSiteService boSiteService;
|
private BOSiteService boSiteService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOGoodsService boGoodsService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOMssageService mssageService;
|
private BOMssageService mssageService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOMbrMapper mbrMapper;
|
private BOMbrMapper mbrMapper;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private BOMaMtngMapper mtmgMapper;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOSelngprufService selngprufService;
|
private BOSelngprufService selngprufService;
|
||||||
|
|
||||||
@@ -150,13 +144,10 @@ public class BOOrdrService{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private BOSubsvcService subsvcService;
|
private BOSubsvcService subsvcService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private PropertyService propertyService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문 전체 목록 조회
|
* 주문 전체 목록 조회
|
||||||
* @param vo(mbrInnb)
|
* @param ordrSrchVO
|
||||||
* @return List<DataMap>
|
* @return List<DataMap>
|
||||||
*/
|
*/
|
||||||
public Map<String, List<DataMap>> selectBOAllOrdrListInqire(BOOrdrSrchVO ordrSrchVO) {
|
public Map<String, List<DataMap>> selectBOAllOrdrListInqire(BOOrdrSrchVO ordrSrchVO) {
|
||||||
@@ -169,7 +160,6 @@ public class BOOrdrService{
|
|||||||
&& ordrSrchVO.getSrchOrdrSttusCds().length > 0) {
|
&& ordrSrchVO.getSrchOrdrSttusCds().length > 0) {
|
||||||
for(String srchOrdrSttusCd : ordrSrchVO.getSrchOrdrSttusCds()){
|
for(String srchOrdrSttusCd : ordrSrchVO.getSrchOrdrSttusCds()){
|
||||||
ordrSrchVO.setSrchOrdrSttusCd(srchOrdrSttusCd);
|
ordrSrchVO.setSrchOrdrSttusCd(srchOrdrSttusCd);
|
||||||
//resultMap.put("resultList"+ordrSrchVO.getSrchOrdrSttusCd(),mapper.selectBOAllOrdrListInqire(ordrSrchVO));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
log.debug("resultMap : {}", resultMap);
|
log.debug("resultMap : {}", resultMap);
|
||||||
@@ -178,7 +168,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 기본배송지 유무 조회
|
* 기본배송지 유무 조회
|
||||||
* @param crmDlvylcVO
|
* @param map
|
||||||
* @return Map<String, String>
|
* @return Map<String, String>
|
||||||
*/
|
*/
|
||||||
public String selectBOdftDlvylcAt(DataMap map){
|
public String selectBOdftDlvylcAt(DataMap map){
|
||||||
@@ -197,12 +187,7 @@ public class BOOrdrService{
|
|||||||
try {
|
try {
|
||||||
// 기존 기본배송지 N 처리
|
// 기존 기본배송지 N 처리
|
||||||
mapper.updateBODftDlvylcAt(crmDlvylcVO);
|
mapper.updateBODftDlvylcAt(crmDlvylcVO);
|
||||||
// 기본배송지 수정
|
|
||||||
/*int result = mapper.updateBOdftDlvylcAtUpdt(crmDlvylcVO);
|
|
||||||
// 배송지 등록 결과 massage에 담음
|
|
||||||
if (result > 0) {
|
|
||||||
message.put("result", "자주쓰는 배송지 등록 성공");
|
|
||||||
}*/
|
|
||||||
} catch (WnbtRestException wre){
|
} catch (WnbtRestException wre){
|
||||||
throw new WnbtRestException(wre.getMessage());
|
throw new WnbtRestException(wre.getMessage());
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
@@ -213,7 +198,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 기본 배송지 설정
|
* 기본 배송지 설정
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylcVO
|
||||||
*/
|
*/
|
||||||
public Map<String, String> updateBODftDlvylcAtYset(BOCrmDlvylcVO crmDlvylcVO){
|
public Map<String, String> updateBODftDlvylcAtYset(BOCrmDlvylcVO crmDlvylcVO){
|
||||||
Map<String, String> message = new HashMap<>();
|
Map<String, String> message = new HashMap<>();
|
||||||
@@ -248,7 +233,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 최근 배송지 목록 조회
|
* 최근 배송지 목록 조회
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylcVO
|
||||||
* @return List<DataMap>
|
* @return List<DataMap>
|
||||||
*/
|
*/
|
||||||
public List<DataMap> selectBORecentDlvylcListInqire(BOCrmDlvylcVO crmDlvylcVO) {
|
public List<DataMap> selectBORecentDlvylcListInqire(BOCrmDlvylcVO crmDlvylcVO) {
|
||||||
@@ -266,7 +251,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 회원 자주쓰는 배송지 상세 조회
|
* 회원 자주쓰는 배송지 상세 조회
|
||||||
* @param vo(adbkInnb)
|
* @param crmDlvylcVO
|
||||||
* @return BOCrmDlvylcVO
|
* @return BOCrmDlvylcVO
|
||||||
*/
|
*/
|
||||||
public BOCrmDlvylcVO selectBODlvylcUpdtPopupForm(BOCrmDlvylcVO crmDlvylcVO) {
|
public BOCrmDlvylcVO selectBODlvylcUpdtPopupForm(BOCrmDlvylcVO crmDlvylcVO) {
|
||||||
@@ -283,7 +268,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 자주쓰는 배송지 등록
|
* 자주쓰는 배송지 등록
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylcVO
|
||||||
* @return Integer
|
* @return Integer
|
||||||
*/
|
*/
|
||||||
public Map<String, String> insertBODlvylcRegist(BOCrmDlvylcVO crmDlvylcVO) {
|
public Map<String, String> insertBODlvylcRegist(BOCrmDlvylcVO crmDlvylcVO) {
|
||||||
@@ -302,7 +287,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 자주쓰는 배송지 삭제
|
* 자주쓰는 배송지 삭제
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylcVO
|
||||||
* @return Map<String, String>
|
* @return Map<String, String>
|
||||||
*/
|
*/
|
||||||
public Map<String, String> deleteBODlvylc(BOCrmDlvylcVO crmDlvylcVO) {
|
public Map<String, String> deleteBODlvylc(BOCrmDlvylcVO crmDlvylcVO) {
|
||||||
@@ -320,7 +305,7 @@ public class BOOrdrService{
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 자주쓰는 배송지 수정
|
* 자주쓰는 배송지 수정
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylcVO
|
||||||
* @return Map<String, String>
|
* @return Map<String, String>
|
||||||
*/
|
*/
|
||||||
public Map<String, String> updateBODlvylc(BOCrmDlvylcVO crmDlvylcVO) {
|
public Map<String, String> updateBODlvylc(BOCrmDlvylcVO crmDlvylcVO) {
|
||||||
@@ -338,7 +323,7 @@ public class BOOrdrService{
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 기본 배송지 체크 시 다른 배송지 N으로 수정
|
* 기본 배송지 체크 시 다른 배송지 N으로 수정
|
||||||
* @param BOCrmDlvylcVO
|
* @param crmDlvylc
|
||||||
*/
|
*/
|
||||||
public void updateBODftDlvylcAt(BOCrmDlvylcVO crmDlvylc) {
|
public void updateBODftDlvylcAt(BOCrmDlvylcVO crmDlvylc) {
|
||||||
mapper.updateBODftDlvylcAt(crmDlvylc);
|
mapper.updateBODftDlvylcAt(crmDlvylc);
|
||||||
@@ -569,33 +554,6 @@ public class BOOrdrService{
|
|||||||
// 주문 상태 업데이트
|
// 주문 상태 업데이트
|
||||||
orderCommService.commonOrderSttusCdUpdt(orderVO, currOrdrSttusCd);
|
orderCommService.commonOrderSttusCdUpdt(orderVO, currOrdrSttusCd);
|
||||||
|
|
||||||
// try {
|
|
||||||
// orderCommService.commonOrderSttusCdUpdt(orderVO, currOrdrSttusCd);
|
|
||||||
// } catch(Exception e) {
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO); // FM_ORDER 주문 상태 수정
|
|
||||||
//
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO); // FM_ORDER_ITEM_OPTION 주문 상태 수정
|
|
||||||
//
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO); // FM_ORDER_SHIPPING 주문 상태 수정
|
|
||||||
|
|
||||||
|
|
||||||
// if (StringUtils.hasText(currOrdrSttusCd) && StringUtils.hasText(ordrSttusCd)) {
|
|
||||||
// if (Integer.parseInt(currOrdrSttusCd) > Integer.parseInt(ordrSttusCd) || "95".equals(ordrSttusCd)) {
|
|
||||||
//// BOOrderLogVO logVO = new BOOrderLogVO();
|
|
||||||
//
|
|
||||||
// logVO.setOrdrInnb(new BigInteger(ordrInnb));
|
|
||||||
// logVO.setSopmalCd(ordrVO.getSopmalCd());
|
|
||||||
// logVO.setLogDvCd("01");
|
|
||||||
// logVO.setDvCd("02");
|
|
||||||
// logVO.setLogSj("되돌리기 [" + currOrdrSttusCdNm + " => " + ordrSttusCdNm + "]");
|
|
||||||
//
|
|
||||||
// purchsMapper.insertOrderLog(logVO);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
if ("25".equals(ordrSttusCd)) {
|
if ("25".equals(ordrSttusCd)) {
|
||||||
purchsMapper.updateOrderSetleComptAt(orderVO);
|
purchsMapper.updateOrderSetleComptAt(orderVO);
|
||||||
}
|
}
|
||||||
@@ -858,22 +816,6 @@ public class BOOrdrService{
|
|||||||
* @return DataMap
|
* @return DataMap
|
||||||
*/
|
*/
|
||||||
public Map<String, Object> selectBOSetleCanclRefndRegist(BOOrdrVO ordrVO) {
|
public Map<String, Object> selectBOSetleCanclRefndRegist(BOOrdrVO ordrVO) {
|
||||||
/*
|
|
||||||
DataMap ordrDtl = mapper.selectOrdrDtl(ordrVO);
|
|
||||||
|
|
||||||
List<DataMap> ordrGoodsList = mapper.selectCanclPaymentGoodsList(ordrVO);
|
|
||||||
|
|
||||||
int totOrdrQy = ordrGoodsList.stream().mapToInt(obj -> (int) obj.get("ordrQy")).sum();
|
|
||||||
|
|
||||||
DataMap content = new DataMap() {{
|
|
||||||
put("ordrDtl", ordrDtl);
|
|
||||||
put("ordrGoodsList", ordrGoodsList);
|
|
||||||
put("totOrdrQy", totOrdrQy);
|
|
||||||
}};
|
|
||||||
return content;
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> content = new HashMap<>();
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
|
||||||
BOOrdrDlvyVO ordrDlvyVO = new BOOrdrDlvyVO();
|
BOOrdrDlvyVO ordrDlvyVO = new BOOrdrDlvyVO();
|
||||||
@@ -905,7 +847,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
log.debug("여러곳 배송 환불 상품 목록 : {}", shippingList);
|
log.debug("여러곳 배송 환불 상품 목록 : {}", shippingList);
|
||||||
|
|
||||||
List<DataMap> returnResnList = mapper.selectReturnResnList(ordrDlvyVO);
|
//List<DataMap> returnResnList = mapper.selectReturnResnList(ordrDlvyVO);
|
||||||
|
|
||||||
// 공통코드 호출
|
// 공통코드 호출
|
||||||
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
BOMaComncdVO bOMaComncdVO = new BOMaComncdVO();
|
||||||
@@ -1031,7 +973,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 관리자 > 주문 > 주문 로그 등록
|
* 관리자 > 주문 > 주문 로그 등록
|
||||||
* @param BOOrderLogVO
|
* @param logVO
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void updateDlvylcInfoLogRegist(BOOrderLogVO logVO) {
|
public void updateDlvylcInfoLogRegist(BOOrderLogVO logVO) {
|
||||||
@@ -2833,8 +2775,6 @@ public class BOOrdrService{
|
|||||||
spbkVO.setMbrId(ordrVO.getMbrId());
|
spbkVO.setMbrId(ordrVO.getMbrId());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//구매하기 상품 조회
|
//구매하기 상품 조회
|
||||||
spbkVO.setCartDvCd("02");
|
spbkVO.setCartDvCd("02");
|
||||||
List<BOGoodsVO> goodsList02 = mapper.selectSpbkGoodsList(spbkVO);
|
List<BOGoodsVO> goodsList02 = mapper.selectSpbkGoodsList(spbkVO);
|
||||||
@@ -3424,10 +3364,6 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
LinkedHashMap<String, Object> shippingMap = (LinkedHashMap) param.get("shipping");
|
LinkedHashMap<String, Object> shippingMap = (LinkedHashMap) param.get("shipping");
|
||||||
|
|
||||||
// String ordrAdressZip = StringUtil.isNullToString(param.get("dlvylcZip"));
|
|
||||||
// String dlvylcAreaCd = (String) param.get("dlvylcAreaCd");
|
|
||||||
// String prefcd = (String) param.get("prefcd");
|
|
||||||
|
|
||||||
String ordrAdressZip = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("dlvylcZip") : "");
|
String ordrAdressZip = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("dlvylcZip") : "");
|
||||||
String dlvylcAreaCd = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("dlvylcAreaCd") : "");
|
String dlvylcAreaCd = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("dlvylcAreaCd") : "");
|
||||||
String prefcd = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("prefcd") : "");
|
String prefcd = StringUtil.isNullToString(shippingMap != null ? shippingMap.get("prefcd") : "");
|
||||||
@@ -3861,6 +3797,11 @@ public class BOOrdrService{
|
|||||||
return orderService.insertMngrOrdrRegist(param, MemberJwtContextHolder.getMemberInfo());
|
return orderService.insertMngrOrdrRegist(param, MemberJwtContextHolder.getMemberInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
무통장 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 무통장 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 무통장 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -3930,55 +3871,6 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
purchsMapper.updateOrderSetleNoBank(orderSetleVO);
|
purchsMapper.updateOrderSetleNoBank(orderSetleVO);
|
||||||
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO); // FM_ORDER 주문 상태 수정
|
|
||||||
//
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO); // FM_ORDER_ITEM_OPTION 주문 상태 수정
|
|
||||||
//
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO); // FM_ORDER_SHIPPING 주문 상태 수정
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// // 2. 쿠폰 사용 처리 ===============================================================
|
|
||||||
// try {
|
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =================================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
selectBOOrdrMssageSndngProcs(orderVO);
|
selectBOOrdrMssageSndngProcs(orderVO);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@@ -4002,6 +3894,11 @@ public class BOOrdrService{
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
KCP 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 거래등록 정보 조회
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 거래등록 정보 조회
|
||||||
* @param param
|
* @param param
|
||||||
@@ -4065,63 +3962,15 @@ public class BOOrdrService{
|
|||||||
orderVO.setOrdrSttusCd("25"); // 주문상태코드(25:결제확인)
|
orderVO.setOrdrSttusCd("25"); // 주문상태코드(25:결제확인)
|
||||||
}
|
}
|
||||||
|
|
||||||
// // 1-1. FM_ORDER 주문 상태 수정 ==================================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO);
|
|
||||||
// // 1-2. FM_ORDER_ITEM_OPTION 주문 상태 수정 =====================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO);
|
|
||||||
// // 1-3. FM_ORDER_SHIPPING 주문 상태 수정 ========================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
// // 2. 쿠폰 사용 처리 ===============================================================
|
/* ===============================================
|
||||||
// try {
|
결제 API
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
================================================== */
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =================================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> kcpMap = payService.insertKcpPay(payVO);
|
Map<String, Object> kcpMap = payService.insertKcpPay(payVO);
|
||||||
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(kcpMap)) {
|
if (!CollectionUtils.isEmpty(kcpMap)) {
|
||||||
String response = StringUtil.isNullToString(kcpMap.get("response"));
|
String response = StringUtil.isNullToString(kcpMap.get("response"));
|
||||||
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
@@ -4142,23 +3991,6 @@ public class BOOrdrService{
|
|||||||
orderPgLogVO.setEscwAt(resultMap.get("escw_yn") != null ? resultMap.get("escw_yn").toString() : "N");
|
orderPgLogVO.setEscwAt(resultMap.get("escw_yn") != null ? resultMap.get("escw_yn").toString() : "N");
|
||||||
orderPgLogVO.setDelngAmt(resultMap.get("amount") != null ? new BigDecimal(resultMap.get("amount").toString()) : BigDecimal.valueOf(0));
|
orderPgLogVO.setDelngAmt(resultMap.get("amount") != null ? new BigDecimal(resultMap.get("amount").toString()) : BigDecimal.valueOf(0));
|
||||||
|
|
||||||
// 금액 검증 - PG사 결제 승인전 하고 있음
|
|
||||||
/*BOOrdrVO paramVO = new BOOrdrVO();
|
|
||||||
paramVO.setSopmalCd(payVO.getSopMalCd());
|
|
||||||
paramVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
DataMap ordrMap = mapper.selectOrdrGoodsDtllTot(paramVO);
|
|
||||||
if (!CollectionUtils.isEmpty(resultMap)) {
|
|
||||||
BigDecimal setleAmt = (BigDecimal) ordrMap.get("setleAmt");
|
|
||||||
BigDecimal amount = new BigDecimal((String) resultMap.get("amount"));
|
|
||||||
|
|
||||||
if (setleAmt.intValue() == amount.intValue()) {
|
|
||||||
orderPgLogVO.setDelngAmt(amount);
|
|
||||||
} else {
|
|
||||||
insertSetleFailLog(payVO.getSopMalCd(), payVO.getOrderId(), "000", "KCP 결제 실패 [결제 금액 매칭 오류]"); // 결제 실패 로그 등록
|
|
||||||
throw new WnbtRestException("KCP 결제 실패 [결제 금액 매칭 오류]");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
log.debug("orderPgLogVO1===={}",orderPgLogVO);
|
log.debug("orderPgLogVO1===={}",orderPgLogVO);
|
||||||
|
|
||||||
if ("01".equals(payVO.getSetleTyCd()) || "10".equals(payVO.getSetleTyCd())) { //카드/간편결제카드(01), 페이코(10)
|
if ("01".equals(payVO.getSetleTyCd()) || "10".equals(payVO.getSetleTyCd())) { //카드/간편결제카드(01), 페이코(10)
|
||||||
@@ -4404,6 +4236,10 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSS 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -4459,60 +4295,10 @@ public class BOOrdrService{
|
|||||||
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
// // 1-1. FM_ORDER 주문 상태 수정 ==============================================
|
/* ===============================================
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO);
|
결제 API
|
||||||
// // 1-2. FM_ORDER_ITEM_OPTION 주문 상태 수정 =====================================
|
================================================== */
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO);
|
|
||||||
// // 1-3. FM_ORDER_SHIPPING 주문 상태 수정 ========================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// // 2. 쿠폰 사용 처리 ===============================================================
|
|
||||||
// try {
|
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =================================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> tossPayMap = payService.insertTossPay(payVO);
|
Map<String, Object> tossPayMap = payService.insertTossPay(payVO);
|
||||||
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
||||||
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
||||||
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
@@ -4550,24 +4336,6 @@ public class BOOrdrService{
|
|||||||
orderPgLogVO.setVirtlAcntVrifyKy(StringUtil.isNullToString(rctMap.get("url")));
|
orderPgLogVO.setVirtlAcntVrifyKy(StringUtil.isNullToString(rctMap.get("url")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 금액 검증 - PG사 결제 승인전 하고 있음
|
|
||||||
/*BOOrdrVO ordrVO = new BOOrdrVO();
|
|
||||||
ordrVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
ordrVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
DataMap ordrMap = mapper.selectOrdrGoodsDtllTot(ordrVO);
|
|
||||||
if (!CollectionUtils.isEmpty(resultMap)) {
|
|
||||||
BigDecimal setleAmt = (BigDecimal) ordrMap.get("setleAmt");
|
|
||||||
BigDecimal totalAmount = BigDecimal.valueOf((int) resultMap.get("totalAmount"));
|
|
||||||
|
|
||||||
if (setleAmt.intValue() == totalAmount.intValue()) {
|
|
||||||
orderPgLogVO.setDelngAmt(totalAmount);
|
|
||||||
} else {
|
|
||||||
insertSetleFailLog(payVO.getSopmalCd(), payVO.getOrderId(), "0000", "토스 결제 실패 [결제 금액 매칭 오류]"); // 결제 실패 로그 등록
|
|
||||||
|
|
||||||
throw new WnbtRestException("토스 결제 실패 [결제 금액 매칭 오류]");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if ("01".equals(payVO.getSetleTyCd()) || "10".equals(payVO.getSetleTyCd())) { // 카드(01), 페이코(10)
|
if ("01".equals(payVO.getSetleTyCd()) || "10".equals(payVO.getSetleTyCd())) { // 카드(01), 페이코(10)
|
||||||
LinkedHashMap cartMap = (LinkedHashMap) resultMap.get("card"); //카드결제(일반카드, 간편결제카드, 간편결제카드+적립식)
|
LinkedHashMap cartMap = (LinkedHashMap) resultMap.get("card"); //카드결제(일반카드, 간편결제카드, 간편결제카드+적립식)
|
||||||
|
|
||||||
@@ -4849,6 +4617,9 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSSPAY 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
||||||
@@ -4865,17 +4636,6 @@ public class BOOrdrService{
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 주문 후 장바구니 비우기
|
|
||||||
* @param orderVO
|
|
||||||
*/
|
|
||||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
|
||||||
public void deleteBOCart(BOOrderVO orderVO) throws Exception {
|
|
||||||
purchsMapper.deleteCart(orderVO);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -4910,62 +4670,11 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
//
|
|
||||||
// // 1-1. FM_ORDER 주문 상태 수정 ==============================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO);
|
|
||||||
// // 1-2. FM_ORDER_ITEM_OPTION 주문 상태 수정 ==================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO);
|
|
||||||
// // 1-3. FM_ORDER_SHIPPING 주문 상태 수정 =====================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO);
|
|
||||||
//
|
|
||||||
// // 2. 쿠폰 사용 처리 ==========================================================
|
|
||||||
// try {
|
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =============================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* ===============================================
|
/* ===============================================
|
||||||
5. 결제 API
|
5. 결제 API
|
||||||
================================================== */
|
================================================== */
|
||||||
Map<String, Object> tossPayMap = payService.insertTossPay(payVO);
|
Map<String, Object> tossPayMap = payService.insertTossPay(payVO);
|
||||||
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
||||||
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
||||||
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
@@ -5204,6 +4913,10 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
KCP 카드 수기 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 카드 수기 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 카드 수기 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -5254,59 +4967,10 @@ public class BOOrdrService{
|
|||||||
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
// // 1-1. FM_ORDER 주문 상태 수정 ==============================================
|
/* ===============================================
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO);
|
결제 API
|
||||||
// // 1-2. FM_ORDER_ITEM_OPTION 주문 상태 수정 =====================================
|
================================================== */
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO);
|
|
||||||
// // 1-3. FM_ORDER_SHIPPING 주문 상태 수정 ========================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO);
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// // 2. 쿠폰 사용 처리 ===============================================================
|
|
||||||
// try {
|
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =================================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> kcpMap = payService.insertKcpPayKeyin(payVO);
|
Map<String, Object> kcpMap = payService.insertKcpPayKeyin(payVO);
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(kcpMap)) {
|
if (!CollectionUtils.isEmpty(kcpMap)) {
|
||||||
String response = StringUtil.isNullToString(kcpMap.get("response"));
|
String response = StringUtil.isNullToString(kcpMap.get("response"));
|
||||||
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
@@ -5320,24 +4984,6 @@ public class BOOrdrService{
|
|||||||
orderPgLogVO.setEscwAt(resultMap.get("escw_yn") != null ? resultMap.get("escw_yn").toString() : "N");
|
orderPgLogVO.setEscwAt(resultMap.get("escw_yn") != null ? resultMap.get("escw_yn").toString() : "N");
|
||||||
orderPgLogVO.setDelngAmt(resultMap.get("amount") != null ? new BigDecimal(resultMap.get("amount").toString()) : BigDecimal.valueOf(0));
|
orderPgLogVO.setDelngAmt(resultMap.get("amount") != null ? new BigDecimal(resultMap.get("amount").toString()) : BigDecimal.valueOf(0));
|
||||||
|
|
||||||
// 금액 검증 - PG사 결제 승인전 하고 있음
|
|
||||||
/*BOOrdrVO paramVO = new BOOrdrVO();
|
|
||||||
paramVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
paramVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
DataMap ordrMap = mapper.selectOrdrGoodsDtllTot(paramVO);
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(resultMap)) {
|
|
||||||
BigDecimal setleAmt = (BigDecimal) ordrMap.get("setleAmt");
|
|
||||||
BigDecimal amount = new BigDecimal((String) resultMap.get("amount"));
|
|
||||||
|
|
||||||
if (setleAmt.intValue() == amount.intValue()) {
|
|
||||||
orderPgLogVO.setDelngAmt(amount);
|
|
||||||
} else {
|
|
||||||
insertSetleFailLog(payVO.getSopmalCd(), payVO.getOrderId(), "0000", "KCP 결제 실패 [결제 금액 매칭 오류]"); // 결제 실패 로그 등록
|
|
||||||
throw new WnbtRestException("KCP 결제 실패 [결제 금액 매칭 오류]");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
orderPgLogVO.setApvlnb(StringUtil.isNullToString(resultMap.get("app_no")));
|
orderPgLogVO.setApvlnb(StringUtil.isNullToString(resultMap.get("app_no")));
|
||||||
orderPgLogVO.setCardCmpnyCd(StringUtil.isNullToString(resultMap.get("card_cd")));
|
orderPgLogVO.setCardCmpnyCd(StringUtil.isNullToString(resultMap.get("card_cd")));
|
||||||
orderPgLogVO.setCardCmpnyNm(StringUtil.isNullToString(resultMap.get("card_name")));
|
orderPgLogVO.setCardCmpnyNm(StringUtil.isNullToString(resultMap.get("card_name")));
|
||||||
@@ -5513,6 +5159,9 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSS 카드 수기 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 카드 수기 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 카드 수기 결제 정보 등록
|
||||||
@@ -5562,59 +5211,10 @@ public class BOOrdrService{
|
|||||||
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
// // 1-1. FM_ORDER 주문 상태 수정 ==============================================
|
/* ===============================================
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrder(orderVO);
|
결제 API
|
||||||
// // 1-2. FM_ORDER_ITEM_OPTION 주문 상태 수정 ==================================
|
================================================== */
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderItemOption(orderVO);
|
|
||||||
// // 1-3. FM_ORDER_SHIPPING 주문 상태 수정 =====================================
|
|
||||||
// purchsMapper.updateOrdrSttusCdByFmOrderShipping(orderVO);
|
|
||||||
//
|
|
||||||
// // 2. 쿠폰 사용 처리 ===============================================================
|
|
||||||
// try {
|
|
||||||
// BODwldCouponVO dwldCouponVO = new BODwldCouponVO();
|
|
||||||
// dwldCouponVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
// dwldCouponVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
// couponService.updateBOUseCouponProcs(dwldCouponVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 쿠폰 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("쿠폰 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 3.사용 마일리지 조회 및 할인 차감 =================================================
|
|
||||||
// BOMlgVO mlgVO = purchsMapper.selectOrdrMlgUse(orderVO);
|
|
||||||
// if (mlgVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = mlgVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOMlgUse(mlgVO);
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("마일리지 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 4. (2025-06-20 CJH 추가) 사용 GC 머니 차감 =================================================
|
|
||||||
// BOCashVO cashVO = purchsMapper.selectOrdrCashMlgUse(payVO);
|
|
||||||
// log.debug("캐쉬 VO : {}", cashVO);
|
|
||||||
// if (cashVO != null) {
|
|
||||||
// BigDecimal accmlmnyAmt = cashVO.getAccmlmnyAmt();
|
|
||||||
//
|
|
||||||
// if (0 < accmlmnyAmt.intValue()) {
|
|
||||||
// try {
|
|
||||||
// mlgService.insertBOCashUse(cashVO); // 사용 마일리지 할인 차감
|
|
||||||
// } catch (Exception e) {
|
|
||||||
// log.debug("사용 충전형 마일리지 처리 실패", e.getMessage());
|
|
||||||
// throw new WnbtRestException("GC 머니 사용에 실패했습니다.\n관리자에게 문의하시기 바랍니다.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> tossPayMap = payService.insertTossPayKeyin(payVO);
|
Map<String, Object> tossPayMap = payService.insertTossPayKeyin(payVO);
|
||||||
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
if (!CollectionUtils.isEmpty(tossPayMap)) {
|
||||||
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
String response = StringUtil.isNullToString(tossPayMap.get("response"));
|
||||||
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
@@ -5647,27 +5247,6 @@ public class BOOrdrService{
|
|||||||
orderPgLogVO.setVirtlAcntVrifyKy(StringUtil.isNullToString(rctMap.get("url")));
|
orderPgLogVO.setVirtlAcntVrifyKy(StringUtil.isNullToString(rctMap.get("url")));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 금액 검증 - PG사 결제 승인전 하고 있음
|
|
||||||
/*BOOrdrVO paramVO = new BOOrdrVO();
|
|
||||||
|
|
||||||
paramVO.setSopmalCd(payVO.getSopmalCd());
|
|
||||||
paramVO.setOrdrInnb(payVO.getOrderId());
|
|
||||||
|
|
||||||
DataMap ordrMap = mapper.selectOrdrGoodsDtllTot(paramVO);
|
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(resultMap)) {
|
|
||||||
BigDecimal setleAmt = (BigDecimal) ordrMap.get("setleAmt");
|
|
||||||
BigDecimal totalAmount = BigDecimal.valueOf((int) resultMap.get("totalAmount"));
|
|
||||||
|
|
||||||
if (setleAmt.intValue() == totalAmount.intValue()) {
|
|
||||||
orderPgLogVO.setDelngAmt(totalAmount);
|
|
||||||
} else {
|
|
||||||
insertSetleFailLog(payVO.getSopmalCd(), payVO.getOrderId(), "0000", "토스 결제 실패 [결제 금액 매칭 오류]"); // 결제 실패 로그 등록
|
|
||||||
|
|
||||||
throw new WnbtRestException("토스 결제 실패 [결제 금액 매칭 오류]");
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
LinkedHashMap cartMap = (LinkedHashMap) resultMap.get("card");
|
LinkedHashMap cartMap = (LinkedHashMap) resultMap.get("card");
|
||||||
|
|
||||||
if (!CollectionUtils.isEmpty(resultMap)) {
|
if (!CollectionUtils.isEmpty(resultMap)) {
|
||||||
@@ -5850,6 +5429,137 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
KIWOOM 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KIWOOM 결제 정보 등록
|
||||||
|
* @param payVO
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public Map<String, Object> insertKiwoomSetle(BOPayVO payVO) throws Exception {
|
||||||
|
Map<String, Object> message = new HashMap<>() ;
|
||||||
|
|
||||||
|
message = insertKiwoomSetle1(payVO); // 결제 관련 처리
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KIWOOM 결제 정보 등록
|
||||||
|
* @param payVO
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
public Map<String, Object> insertKiwoomSetle1(BOPayVO payVO) throws Exception {
|
||||||
|
|
||||||
|
boolean payResult = true;
|
||||||
|
Map<String, Object> content = new HashMap<>();
|
||||||
|
BOOrderPgLogVO orderPgLogVO = new BOOrderPgLogVO();
|
||||||
|
|
||||||
|
orderPgLogVO.setOrdrInnb(new BigInteger(payVO.getOrderId()));
|
||||||
|
orderPgLogVO.setSopmalCd(payVO.getSopmalCd());
|
||||||
|
orderPgLogVO.setPgCmpnyNm(payVO.getPgCmpnyNm());
|
||||||
|
orderPgLogVO.setSetlerNm(payVO.getSetlerNm());
|
||||||
|
orderPgLogVO.setSetleMthCd(payVO.getSetleTyCd());
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
|
// 1. 주문상태 수정 =====================================================
|
||||||
|
BOOrderVO orderVO = new BOOrderVO();
|
||||||
|
orderVO.setSopmalCd(payVO.getSopmalCd());
|
||||||
|
orderVO.setOrdrInnb(new BigInteger(payVO.getOrderId()));
|
||||||
|
orderVO.setOrdrSttusCd("25"); // 주문상태코드(25:결제확인)
|
||||||
|
|
||||||
|
if (StringUtils.hasText(payVO.getMbrInnb())) {
|
||||||
|
orderVO.setMbrInnb(new BigInteger(payVO.getMbrInnb()));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
결제 API >> DB select로 진행함
|
||||||
|
================================================== */
|
||||||
|
// todo :: api 연결이 아닌 db셀렉트로 변경.
|
||||||
|
DataMap kiwoomPayMap = mapper.selectKiwoomPgApiLog(payVO);//payService.insertTossPayKeyin(payVO);
|
||||||
|
if (!CollectionUtils.isEmpty(kiwoomPayMap)) {
|
||||||
|
String response = StringUtil.isNullToString(kiwoomPayMap.get("rsltParam"));
|
||||||
|
Map<String, Object> resultMap = new ObjectMapper().readValue(response, Map.class);
|
||||||
|
|
||||||
|
if (!CollectionUtils.isEmpty(resultMap)) {
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
5. FM_ORDER_PG_LOG 등록값 셋팅
|
||||||
|
================================================== */
|
||||||
|
orderPgLogVO.setDelngNb(StringUtil.isNullToString(resultMap.get("DAOUTRX"))); // 거래번호 (결제키)
|
||||||
|
orderPgLogVO.setConfmDt(selectDateFormat(StringUtil.isNullToString(resultMap.get("SETTDATE")))); // 승인일시
|
||||||
|
orderPgLogVO.setApvlnb(StringUtil.isNullToString(resultMap.get("AUTHNO"))); //승인번호
|
||||||
|
orderPgLogVO.setCardCmpnyCd(StringUtil.isNullToString(resultMap.get("CARDCODE"))); //카드사코드
|
||||||
|
orderPgLogVO.setCardCmpnyNm(StringUtil.isNullToString(bOMaComncdService.selectBOCommcdDetail("TOSS_CARD_CD",orderPgLogVO.getCardCmpnyCd()))); //카드사명
|
||||||
|
orderPgLogVO.setNintrAt((boolean) resultMap.get("NOINTFLAG") ? "Y" : "N"); //무이자여부
|
||||||
|
orderPgLogVO.setInstlmtMtCnt(resultMap.get("INSTALL") != null ? Integer.parseInt(resultMap.get("INSTALL").toString()):0); //할부개월수
|
||||||
|
|
||||||
|
// todo ::: 주문금액을 api테이블과 넘어온 값이랑 비교해야 처리필요
|
||||||
|
//if(!CollectionUtils.isEmpty(resultMap)) {} else {
|
||||||
|
// throw new WnbtRestException("토스 결제 실패 [결제 금액 매칭 오류]");
|
||||||
|
// }
|
||||||
|
orderPgLogVO.setDelngAmt(resultMap.get("AMOUNT") != null ? new BigDecimal(resultMap.get("AMOUNT").toString()) : BigDecimal.valueOf(0));
|
||||||
|
|
||||||
|
orderPgLogVO.setEscwAt("N"); // 에스크로여부
|
||||||
|
orderPgLogVO.setVirtlAcntVrifyKy(""); //매출증빙영수증URL
|
||||||
|
orderPgLogVO.setRsltMssageCn("0000");
|
||||||
|
orderPgLogVO.setRsltCd("정상처리-카드거래");
|
||||||
|
|
||||||
|
// 6. FM_ORDER_SETLE 수정 ==============================================
|
||||||
|
BOOrderSetleVO orderSetleVO = new BOOrderSetleVO();
|
||||||
|
orderSetleVO.setSopmalCd(payVO.getSopmalCd());
|
||||||
|
orderSetleVO.setOrdrInnb(new BigInteger(payVO.getOrderId()));
|
||||||
|
orderSetleVO.setPgInnb(orderPgLogVO.getDelngNb());
|
||||||
|
orderSetleVO.setCredtcardApvlnb(orderPgLogVO.getApvlnb());
|
||||||
|
orderSetleVO.setSetleTyCd(payVO.getSetleTyCd());
|
||||||
|
//orderSetleVO.setSetleMid(StringUtil.isNullToString(mapper.selectBOSopSetleMidKeyInqire(payVO))); // 쇼핑몰 결제 MID(상점키) 조회
|
||||||
|
orderSetleVO.setSetleMid("CFO20585"); //todo : paylink 관련 정리 후 db형으로 바꿈
|
||||||
|
|
||||||
|
purchsMapper.updateOrderSetle(orderSetleVO);
|
||||||
|
|
||||||
|
content.put("status", "0");
|
||||||
|
content.put("message", "키움 결제 정보 등록을 완료 하였습니다.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new WnbtRestException("키움 결제 수신 정보를 찾을 수 없어 결제가 실패하였습니다.\n관리자에게 문의하시기 바랍니다.");
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
selectBOOrdrMssageSndngProcs(orderVO);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.debug("{} 메시지 발송 실패", payVO.getOrderId());
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (WnbtRestException wre) {
|
||||||
|
log.error("insertKiwoomSetle1 WnbtRestException : ", wre);
|
||||||
|
payResult = false;
|
||||||
|
throw wre;
|
||||||
|
} catch (Exception wre) {
|
||||||
|
log.error("insertKiwoomSetle1 Exception : ", wre);
|
||||||
|
payResult = false;
|
||||||
|
throw wre;
|
||||||
|
} finally {
|
||||||
|
log.info("insertKiwoomSetle1 order finally !!!!! {} ", payVO.getOrderId());
|
||||||
|
// FM_ORDER_PG_LOG 등록
|
||||||
|
ordrLogService.insertBOOrderPgLog(orderPgLogVO);
|
||||||
|
// 주문 로그
|
||||||
|
ordrLogService.insertSetleOrderLog(payVO, payResult, "0000", "키움 결제 실패 [결제 정보 NULL]");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6017,6 +5727,17 @@ public class BOOrdrService{
|
|||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 주문 후 장바구니 비우기
|
||||||
|
* @param orderVO
|
||||||
|
*/
|
||||||
|
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||||
|
public void deleteBOCart(BOOrderVO orderVO) throws Exception {
|
||||||
|
purchsMapper.deleteCart(orderVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 주문완료 정보 조회
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 주문완료 정보 조회
|
||||||
* @param ordrVO
|
* @param ordrVO
|
||||||
@@ -6707,7 +6428,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 상품상세 > 기존 장바구니 상품정보 삭제
|
* 사용자 > 상품 > 상품상세 > 기존 장바구니 상품정보 삭제
|
||||||
* @param goodsVOList
|
* @param spbkVO
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -7194,7 +6915,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 배송지 조회
|
* 배송지 조회
|
||||||
* @param payVO
|
* @param vo
|
||||||
*/
|
*/
|
||||||
public DataMap selectBOOrdrDlvylc(BOOrdrShippingVO vo) {
|
public DataMap selectBOOrdrDlvylc(BOOrdrShippingVO vo) {
|
||||||
DataMap map = new DataMap();
|
DataMap map = new DataMap();
|
||||||
@@ -7593,7 +7314,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문 메세지 처리
|
* 주문 메세지 처리
|
||||||
* @param payVO
|
* @param orderVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public void selectBOOrdrMssageSndngProcs (BOOrderVO orderVO) throws Exception {
|
public void selectBOOrdrMssageSndngProcs (BOOrderVO orderVO) throws Exception {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.wb.domainserver.domain.sopmal.ordr.controller;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.wb.domainserver.common.msg.GconeMessageSource;
|
import com.wb.domainserver.common.msg.GconeMessageSource;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrLogService;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||||
import com.wb.domainserver.domain.sopmal.ordr.vo.OrdrVO;
|
import com.wb.domainserver.domain.sopmal.ordr.vo.OrdrVO;
|
||||||
import com.wb.domainserver.exception.WnbtRestException;
|
import com.wb.domainserver.exception.WnbtRestException;
|
||||||
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
import com.wb.domainserver.response.WnbtWebClientResponseHandler;
|
||||||
@@ -9,17 +11,23 @@ import com.wb.domainserver.security.authorization.annotation.AuthPolicy;
|
|||||||
import com.wb.domainserver.security.authorization.annotation.Policy;
|
import com.wb.domainserver.security.authorization.annotation.Policy;
|
||||||
import com.wb.domainserver.util.communicate.RESRC;
|
import com.wb.domainserver.util.communicate.RESRC;
|
||||||
import com.wb.domainserver.util.communicate.SendToResrc;
|
import com.wb.domainserver.util.communicate.SendToResrc;
|
||||||
|
import com.wb.domainserver.util.dataaccess.DataMap;
|
||||||
|
import com.wb.domainserver.util.string.StringUtil;
|
||||||
import com.wb.domainserver.util.util.Util;
|
import com.wb.domainserver.util.util.Util;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import jakarta.servlet.http.HttpServletRequest;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.io.BufferedReader;
|
||||||
import java.util.List;
|
import java.net.URLDecoder;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Controller
|
@Controller
|
||||||
@@ -34,6 +42,9 @@ public class OrdrApiController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private GconeMessageSource messageSource;
|
private GconeMessageSource messageSource;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BOOrdrLogService ordrLogService;
|
||||||
|
|
||||||
private Util utilClass;
|
private Util utilClass;
|
||||||
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
@@ -95,4 +106,135 @@ public class OrdrApiController {
|
|||||||
return Integer.parseInt(cleanedCode.toString(), 16);
|
return Integer.parseInt(cleanedCode.toString(), 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ##################################################
|
||||||
|
사용자 > 결제(키움) > 결제 성공 후 결제값 응답받음
|
||||||
|
################################################## */
|
||||||
|
/**
|
||||||
|
* 키움 결제 연계처리 - 결과통보페이지
|
||||||
|
* @author 이경숙
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/kiwoomPayWebhook")
|
||||||
|
@ResponseBody
|
||||||
|
public ResponseEntity<String> selectPaymentkiwoomWebhook(HttpServletRequest request) throws Exception {
|
||||||
|
|
||||||
|
// 0. 키움에서 온 값 로그 출력 (결제실패에 대한 응답은 없음)
|
||||||
|
printKiwoomRequest(request);
|
||||||
|
|
||||||
|
// 1. 주문 로그 남김 (GC_ORDER_LOG)
|
||||||
|
BOPayVO payVO = new BOPayVO();
|
||||||
|
DataMap pgApiLogReqVO = new DataMap();
|
||||||
|
String orderNo = StringUtil.isNullToString(request.getParameter("ORDERNO"));
|
||||||
|
String orderNm = StringUtil.isNullToString(request.getParameter("USERNAME"));
|
||||||
|
String resParam = queryStringToJson(request.getQueryString());
|
||||||
|
|
||||||
|
payVO.setPgCmpnyNm("kiwoom"); //pg사명
|
||||||
|
payVO.setDvCd("01"); //사용자
|
||||||
|
payVO.setOrderId(orderNo); //주문번호
|
||||||
|
payVO.setSetlerNm(orderNm); //주문자명
|
||||||
|
pgApiLogReqVO.put("resParam",resParam); //응답전문
|
||||||
|
|
||||||
|
ordrLogService.insertSetleOrderPgLog(payVO, pgApiLogReqVO);
|
||||||
|
|
||||||
|
// 2. PG API 로그 남김 (GC_ORDER_PG_API_LOG)
|
||||||
|
pgApiLogReqVO.put("reqParam", ""); //요청전문
|
||||||
|
pgApiLogReqVO.put("ordrInnb", orderNo); //주문번호
|
||||||
|
pgApiLogReqVO.put("sopmalCd", "SK"); //쇼핑몰코드
|
||||||
|
pgApiLogReqVO.put("pgCmpnyNm", "kiwoom"); //pg사명
|
||||||
|
pgApiLogReqVO.put("mbrInnb", ""); //회원번호
|
||||||
|
pgApiLogReqVO.put("resParam", resParam); //응답전문
|
||||||
|
|
||||||
|
ordrLogService.insertBOPgApiLogReqRegist(pgApiLogReqVO);
|
||||||
|
|
||||||
|
String response = "<html><body><RESULT>SUCCESS</RESULT></body></html>";
|
||||||
|
|
||||||
|
return ResponseEntity.ok()
|
||||||
|
.contentType(MediaType.TEXT_HTML)
|
||||||
|
.body(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void printKiwoomRequest(HttpServletRequest request) {
|
||||||
|
try {
|
||||||
|
System.out.println("========== [KIWOOM REQUEST START] ==========");
|
||||||
|
|
||||||
|
// 1. 기본 정보
|
||||||
|
System.out.println("URL : " + request.getRequestURL());
|
||||||
|
System.out.println("METHOD : " + request.getMethod());
|
||||||
|
System.out.println("QUERY : " + request.getQueryString());
|
||||||
|
System.out.println("REMOTE IP : " + request.getRemoteAddr());
|
||||||
|
|
||||||
|
// 2. 파라미터 (가장 중요)
|
||||||
|
System.out.println("---------- PARAM ----------");
|
||||||
|
request.setCharacterEncoding("EUC-KR");
|
||||||
|
request.getParameterMap().forEach((key, values) -> {
|
||||||
|
System.out.println(key + " = " + Arrays.toString(values));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 3. 헤더
|
||||||
|
System.out.println("---------- HEADER ----------");
|
||||||
|
Collections.list(request.getHeaderNames()).forEach(header -> {
|
||||||
|
System.out.println(header + " = " + request.getHeader(header));
|
||||||
|
});
|
||||||
|
|
||||||
|
// 4. Body (JSON 대응)
|
||||||
|
System.out.println("---------- BODY ----------");
|
||||||
|
|
||||||
|
StringBuilder body = new StringBuilder();
|
||||||
|
BufferedReader reader = request.getReader();
|
||||||
|
String line;
|
||||||
|
|
||||||
|
while ((line = reader.readLine()) != null) {
|
||||||
|
body.append(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
System.out.println(body.toString());
|
||||||
|
|
||||||
|
System.out.println("========== [KIWOOM REQUEST END] ==========");
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
System.out.println("❌ REQUEST LOG ERROR");
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String queryStringToJson(String queryString) throws Exception {
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
|
||||||
|
if (queryString != null && !queryString.isEmpty()) {
|
||||||
|
String[] pairs = queryString.split("&");
|
||||||
|
|
||||||
|
for (String pair : pairs) {
|
||||||
|
String[] keyValue = pair.split("=", 2);
|
||||||
|
|
||||||
|
String key = URLDecoder.decode(keyValue[0], "UTF-8");
|
||||||
|
String value = keyValue.length > 1 ? URLDecoder.decode(keyValue[1], "UTF-8") : "";
|
||||||
|
|
||||||
|
map.put(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
return mapper.writeValueAsString(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<String, String> queryStringToMap(String queryString) throws Exception {
|
||||||
|
Map<String, String> map = new HashMap<>();
|
||||||
|
|
||||||
|
if (queryString != null) {
|
||||||
|
for (String param : queryString.split("&")) {
|
||||||
|
String[] pair = param.split("=", 2);
|
||||||
|
|
||||||
|
String key = URLDecoder.decode(pair[0], "EUC-KR");
|
||||||
|
String value = pair.length > 1 ? URLDecoder.decode(pair[1], "EUC-KR") : "";
|
||||||
|
|
||||||
|
map.put(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -831,7 +831,9 @@ public class OrdrController {
|
|||||||
String pgCmpnyNm = setle.getPgCmpnyNm();
|
String pgCmpnyNm = setle.getPgCmpnyNm();
|
||||||
String setleTyCd = setle.getSetleTyCd();
|
String setleTyCd = setle.getSetleTyCd();
|
||||||
|
|
||||||
if ("gcpay".equals(pgCmpnyNm)) {
|
if ("kiwoom".equals(pgCmpnyNm)) {
|
||||||
|
url = "sopmal/ordr/OrdrReqstKiwoomPayR";
|
||||||
|
} else if ("gcpay".equals(pgCmpnyNm)) {
|
||||||
url = "sopmal/ordr/OrdrReqstGcpayPayR";
|
url = "sopmal/ordr/OrdrReqstGcpayPayR";
|
||||||
} else if ("kcp".equals(pgCmpnyNm)) {
|
} else if ("kcp".equals(pgCmpnyNm)) {
|
||||||
if ("sopmal_m".equals(deviceType)) {
|
if ("sopmal_m".equals(deviceType)) {
|
||||||
@@ -1173,19 +1175,6 @@ public class OrdrController {
|
|||||||
|
|
||||||
payVO.setSetlerNm(request.getParameter("buyr_name"));
|
payVO.setSetlerNm(request.getParameter("buyr_name"));
|
||||||
|
|
||||||
//에스크로 정보추가
|
|
||||||
/*payVO.setEscwUsed(request.getParameter("escw_used"));
|
|
||||||
payVO.setPayMod(request.getParameter("pay_mod"));
|
|
||||||
payVO.setRcvrName(request.getParameter("rcvr_name"));
|
|
||||||
payVO.setRcvrTel1(request.getParameter("rcvr_tel1"));
|
|
||||||
payVO.setRcvrTel2(request.getParameter("rcvr_tel2"));
|
|
||||||
payVO.setRcvrZipx(request.getParameter("rcvr_zipx"));
|
|
||||||
payVO.setRcvrAdd1(request.getParameter("rcvr_add1"));
|
|
||||||
payVO.setRcvrAdd2(request.getParameter("rcvr_add2"));
|
|
||||||
payVO.setDeliTerm(request.getParameter("deli_term"));
|
|
||||||
payVO.setBaskCntx(request.getParameter("bask_cntx"));
|
|
||||||
payVO.setGoodInfo(request.getParameter("good_info"));*/
|
|
||||||
|
|
||||||
log.debug("payVO => {} ", new Gson().toJson(payVO));
|
log.debug("payVO => {} ", new Gson().toJson(payVO));
|
||||||
|
|
||||||
String resCd = request.getParameter("res_cd");
|
String resCd = request.getParameter("res_cd");
|
||||||
@@ -1383,6 +1372,101 @@ public class OrdrController {
|
|||||||
return "sopmal/ordr/OrdrRspnsTossPayR";
|
return "sopmal/ordr/OrdrRspnsTossPayR";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 키움 결제 정보 등록
|
||||||
|
* @param model
|
||||||
|
* @param request
|
||||||
|
* @return OrdrRspnsKiwoomPayR.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/insertKiwoomSetle")
|
||||||
|
public String insertKiwoomSetle(ModelMap model, HttpServletRequest request) {
|
||||||
|
BOPayVO payVO = new BOPayVO();
|
||||||
|
|
||||||
|
payVO.setOrderId(request.getParameter("orderId"));
|
||||||
|
payVO.setAmount(request.getParameter("setleAmt"));
|
||||||
|
payVO.setSopmalCd(request.getParameter("sopmalCd"));
|
||||||
|
payVO.setMbrInnb(request.getParameter("mbrInnb"));
|
||||||
|
payVO.setMbrId(request.getParameter("mbrId"));
|
||||||
|
payVO.setSesionId(request.getParameter("sesionId"));
|
||||||
|
payVO.setPgCmpnyNm(request.getParameter("pgCmpnyNm"));
|
||||||
|
payVO.setSetleTyCd(request.getParameter("setleTyCd"));
|
||||||
|
payVO.setSetlerNm(request.getParameter("ordrrNm"));
|
||||||
|
|
||||||
|
String agentId = "";
|
||||||
|
String jSesionId = "";
|
||||||
|
String ipAdres = "";
|
||||||
|
|
||||||
|
// 쿠키를 가져옴
|
||||||
|
Cookie[] cookies = request.getCookies();
|
||||||
|
|
||||||
|
//agentId 쿠키 있을 경우 가져옴
|
||||||
|
if (cookies != null) {
|
||||||
|
for (Cookie cookie : cookies) {
|
||||||
|
if (cookie.getName().equals("JSESSIONID")) {
|
||||||
|
jSesionId = cookie.getValue();
|
||||||
|
payVO.setSessionId(jSesionId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//gc_agent_id 가져옴
|
||||||
|
if (CookieUtil.hasAgentCookie(request.getCookies())) {
|
||||||
|
agentId = CookieUtil.getAgentCookieValue(request.getCookies());
|
||||||
|
payVO.setAgentId(agentId);
|
||||||
|
}
|
||||||
|
Map<String, String> util = new HashMap<>();
|
||||||
|
util = utilClass.getRequestInfo(request);
|
||||||
|
ipAdres = util.get("XForwardedFor");
|
||||||
|
payVO.setIpAdres(ipAdres);
|
||||||
|
|
||||||
|
AnonymousUser user = MemberJwtContextHolder.getMemberInfo();
|
||||||
|
payVO.setMbrNm(user.getMbrNm()); //회원명(관리자명)
|
||||||
|
if ("01".equals(user.getSysDvCd())) {
|
||||||
|
payVO.setDvCd("01");
|
||||||
|
payVO.setSopmalCd(user.getSopmalCd());
|
||||||
|
payVO.setMbrDvCd(user.getMbrDvCd());
|
||||||
|
} else {
|
||||||
|
payVO.setDvCd("02");
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, Object> content;
|
||||||
|
|
||||||
|
try {
|
||||||
|
content = service.insertKiwoomSetle(payVO);
|
||||||
|
} catch (WnbtRestException wre) {
|
||||||
|
log.info("insertKiwoomSetle : 키움 결제 정보 등록 : 실패 WnbtRestException");
|
||||||
|
log.error(wre.getMessage(), wre);
|
||||||
|
content = new HashMap<>() {{
|
||||||
|
put("status", "1");
|
||||||
|
put("message", wre.getMessage());
|
||||||
|
}};
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.info("insertKiwoomSetle : 키움 결제 정보 등록 : 실패");
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
|
||||||
|
content = new HashMap<>() {{
|
||||||
|
put("status", "1");
|
||||||
|
put("message", "키움 결제 정보 등록이 실패하였습니다.\n관리자에게 문의하시기 바랍니다.");
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
||||||
|
if ("0".equals(content.get("status"))) {
|
||||||
|
commonOrderPostProcess(payVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
model.addAttribute("data", content);
|
||||||
|
// responseHandler.handleResponse(
|
||||||
|
// sendToResrc.ofPost(RESRC.GCONEBO, "/gcone/ordr/ordr/insertBOTosspaySetle", payVO),
|
||||||
|
// model,
|
||||||
|
// "data"
|
||||||
|
// );
|
||||||
|
model.addAttribute("paramVO", payVO);
|
||||||
|
|
||||||
|
return "sopmal/ordr/OrdrRspnsKiwoomPayR";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 주문완료 화면 이동
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 주문완료 화면 이동
|
||||||
* @return OrdrComptR.jsp
|
* @return OrdrComptR.jsp
|
||||||
|
|||||||
@@ -703,98 +703,6 @@ public class PayController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 키움 결제 연계처리 - 결과통보페이지
|
|
||||||
* @return PayKiwoomSucsC.jsp
|
|
||||||
* @author 이경숙
|
|
||||||
*/
|
|
||||||
@Policy(AuthPolicy.RESTRICTED)
|
|
||||||
@RequestMapping(value="/kiwoomPayWebhook")
|
|
||||||
@ResponseBody
|
|
||||||
public ResponseEntity<String> selectPaymentkiwoomWebhook(HttpServletRequest request) throws Exception {
|
|
||||||
|
|
||||||
String resultCode = request.getParameter("RESULTCODE");
|
|
||||||
String orderNo = request.getParameter("ORDERNO");
|
|
||||||
String amount = request.getParameter("AMOUNT");
|
|
||||||
|
|
||||||
printKiwoomRequest(request);
|
|
||||||
|
|
||||||
/* 실제 처리해야 되는 부분
|
|
||||||
// 1. 주문 조회
|
|
||||||
Order order = orderService.find(orderNo);
|
|
||||||
|
|
||||||
// 2. 중복 방지
|
|
||||||
if ("PAID".equals(order.getStatus())) return "OK";
|
|
||||||
|
|
||||||
// 3. 금액 검증
|
|
||||||
if (!order.getAmount().equals(Integer.parseInt(amount))) {
|
|
||||||
order.setStatus("FAIL");
|
|
||||||
return "OK";
|
|
||||||
}
|
|
||||||
|
|
||||||
// 4. 성공 처리
|
|
||||||
if ("0000".equals(resultCode)) {
|
|
||||||
order.setStatus("PAID");
|
|
||||||
} else {
|
|
||||||
order.setStatus("FAIL");
|
|
||||||
}
|
|
||||||
|
|
||||||
orderService.save(order);
|
|
||||||
*/
|
|
||||||
String response = "<html><body><RESULT>SUCCESS</RESULT></body></html>";
|
|
||||||
|
|
||||||
return ResponseEntity.ok()
|
|
||||||
.contentType(MediaType.TEXT_HTML)
|
|
||||||
.body(response);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void printKiwoomRequest(HttpServletRequest request) {
|
|
||||||
try {
|
|
||||||
System.out.println("========== [KIWOOM REQUEST START] ==========");
|
|
||||||
|
|
||||||
// 1. 기본 정보
|
|
||||||
System.out.println("URL : " + request.getRequestURL());
|
|
||||||
System.out.println("METHOD : " + request.getMethod());
|
|
||||||
System.out.println("QUERY : " + request.getQueryString());
|
|
||||||
System.out.println("REMOTE IP : " + request.getRemoteAddr());
|
|
||||||
|
|
||||||
// 2. 파라미터 (가장 중요)
|
|
||||||
System.out.println("---------- PARAM ----------");
|
|
||||||
request.getParameterMap().forEach((key, values) -> {
|
|
||||||
System.out.println(key + " = " + Arrays.toString(values));
|
|
||||||
});
|
|
||||||
|
|
||||||
// 3. 헤더
|
|
||||||
System.out.println("---------- HEADER ----------");
|
|
||||||
Collections.list(request.getHeaderNames()).forEach(header -> {
|
|
||||||
System.out.println(header + " = " + request.getHeader(header));
|
|
||||||
});
|
|
||||||
|
|
||||||
// 4. Body (JSON 대응)
|
|
||||||
System.out.println("---------- BODY ----------");
|
|
||||||
|
|
||||||
StringBuilder body = new StringBuilder();
|
|
||||||
BufferedReader reader = request.getReader();
|
|
||||||
String line;
|
|
||||||
|
|
||||||
while ((line = reader.readLine()) != null) {
|
|
||||||
body.append(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
System.out.println(body.toString());
|
|
||||||
|
|
||||||
System.out.println("========== [KIWOOM REQUEST END] ==========");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
System.out.println("❌ REQUEST LOG ERROR");
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 키움 결제 연계처리 - 성공결과페이지
|
* 키움 결제 연계처리 - 성공결과페이지
|
||||||
* @return PayKiwoomSucsC.jsp
|
* @return PayKiwoomSucsC.jsp
|
||||||
|
|||||||
@@ -5739,6 +5739,16 @@
|
|||||||
AND O.SUBSVC_AT = 'Y'
|
AND O.SUBSVC_AT = 'Y'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectKiwoomPgApiLog"
|
||||||
|
parameterType="com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO"
|
||||||
|
resultType="dataMap">
|
||||||
|
SELECT GOPAL.RSLT_PARAM FROM GC_ORDER_PG_API_LOG GOPAL
|
||||||
|
WHERE GOPAL.SOPMAL_CD = #{sopmalCd}
|
||||||
|
AND GOPAL.ORDR_INNB = #{ordrInnb}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,10 @@
|
|||||||
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
const gcpayCardUseAt = $('#gcpayCardUseAt').val();
|
||||||
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
let gcpayAt = ( gcpayCardUseAt === 'Y')? 'Y' : 'N';
|
||||||
const setleTy = $('#setleSetupTyCd').val();
|
const setleTy = $('#setleSetupTyCd').val();
|
||||||
const setleTyCd = (setleTy==='01')?'#pg04':'#pg03';
|
const setleTyCd = '#pg04';
|
||||||
|
if(setleTy==='01')setleTyCd = '#pg04'; //kcp
|
||||||
|
else if(setleTy==='02')setleTyCd = '#pg03'; //toss
|
||||||
|
else if(setleTy==='03')setleTyCd = '#pg06'; //kiwoom
|
||||||
|
|
||||||
if (gcpayAt === 'N') {
|
if (gcpayAt === 'N') {
|
||||||
$(setleTyCd).click();
|
$(setleTyCd).click();
|
||||||
@@ -525,7 +528,12 @@
|
|||||||
|
|
||||||
$(form).find('.pgContent').hide();
|
$(form).find('.pgContent').hide();
|
||||||
$(form).find('#' + id + 'Content').show();
|
$(form).find('#' + id + 'Content').show();
|
||||||
$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
|
||||||
|
//$(form).find('#setleSetupTyCd').val() === '01' ? $(form).find('#pg04Content').show() : $(form).find('#pg03Content').show();
|
||||||
|
if($(form).find('#setleSetupTyCd').val() === '01'){$(form).find('#pg04Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '02'){$(form).find('#pg03Content').show();}
|
||||||
|
else if($(form).find('#setleSetupTyCd').val() === '03'){$(form).find('#pg06Content').show();}
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
$(form).find('#pgCmpnyNm').val(pgCmpnyNm);
|
||||||
|
|
||||||
@@ -579,7 +587,10 @@
|
|||||||
const content = $('.order-method-normal__content');
|
const content = $('.order-method-normal__content');
|
||||||
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
const useCashMlgAmt = $('#useCashMlgAmt').val();
|
||||||
|
|
||||||
$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
//$('#setleSetupTyCd').val() === '01' ? $('#pg04').click() : $('#pg03').click();
|
||||||
|
if($('#setleSetupTyCd').val() === '01'){$('#pg04').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '02'){$('#pg03').click();}
|
||||||
|
else if($('#setleSetupTyCd').val() === '03'){$('#pg05').click();}
|
||||||
|
|
||||||
$('.order-method-normal__btn').removeClass('active');
|
$('.order-method-normal__btn').removeClass('active');
|
||||||
$(this).addClass('active');
|
$(this).addClass('active');
|
||||||
@@ -3014,7 +3025,12 @@
|
|||||||
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
const id = '01' === issuTrgetDvCd ? 'issuTrgetMbtlnb' : 'issuTrgetBsnmNb';
|
||||||
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
let rlPgCmpnyNm = $('#pgCmpnyNm').val();
|
||||||
|
|
||||||
let setleTyId = $('kcp' === pgCmpnyNm ? '#pg04Content' : '#pg03Content').find('button[name="' + setleTyCd + '"]').attr('id');
|
let pgCont = "";
|
||||||
|
if('kiwoom' === pgCmpnyNm) pgCont='pg06Content';
|
||||||
|
else if('kcp' === pgCmpnyNm) pgCont='pg04Content';
|
||||||
|
else pgCont='pg03Content';
|
||||||
|
let setleTyId = $('#'+pgCont).find('button[name="' + setleTyCd + '"]').attr('id');
|
||||||
|
|
||||||
|
|
||||||
if ('tosspay' === rlPgCmpnyNm) {
|
if ('tosspay' === rlPgCmpnyNm) {
|
||||||
setleTyId = 'acount'
|
setleTyId = 'acount'
|
||||||
@@ -3510,6 +3526,82 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var pf;
|
||||||
|
function kiwoomPay() {
|
||||||
|
|
||||||
|
console.log("kiwoomPay script start :::::");
|
||||||
|
|
||||||
|
pf = document.payForm;
|
||||||
|
|
||||||
|
// 입력값 가져오기
|
||||||
|
var CPID = pf.CPID.value;
|
||||||
|
var PAYMETHOD = pf.PAYMETHOD.value;
|
||||||
|
var ORDERNO = pf.ORDERNO.value;
|
||||||
|
var TYPE = pf.TYPE.value;
|
||||||
|
var AMOUNT = pf.AMOUNT.value;
|
||||||
|
|
||||||
|
const url = '<c:url value="/sopmal/pay/kiwoomPayGetEnc"/>';
|
||||||
|
|
||||||
|
// AJAX로 kiwoom_ENC 값 요청
|
||||||
|
$.ajax({
|
||||||
|
url : url,
|
||||||
|
type : "POST",
|
||||||
|
dataType : "json",
|
||||||
|
data : {
|
||||||
|
CPID : CPID,
|
||||||
|
PAYMETHOD : PAYMETHOD,
|
||||||
|
ORDERNO : ORDERNO,
|
||||||
|
TYPE : TYPE,
|
||||||
|
AMOUNT : AMOUNT
|
||||||
|
},
|
||||||
|
success : function(res) {
|
||||||
|
|
||||||
|
console.log("response :::::",res);
|
||||||
|
console.log("response KIWOOM_ENC :::::",JSON.parse(res.response).KIWOOM_ENC);
|
||||||
|
|
||||||
|
var enc = JSON.parse(res.response).KIWOOM_ENC;
|
||||||
|
|
||||||
|
if (enc) {
|
||||||
|
// kiwoom_ENC 값 입력
|
||||||
|
pf.KIWOOM_ENC.value = enc;
|
||||||
|
|
||||||
|
console.log("response enc :::::",enc);
|
||||||
|
|
||||||
|
// 결제창 URL 설정
|
||||||
|
var PayServer = pf.SERVER.value;
|
||||||
|
var PayType = pf.TYPE.value;
|
||||||
|
var fileName = "";
|
||||||
|
console.log("response PayServer :::::", PayServer);
|
||||||
|
console.log("response PayType :::::", PayType);
|
||||||
|
if (PayServer === "DEV") {
|
||||||
|
fileName = "https://apitest.kiwoompay.co.kr/pay/linkEnc";
|
||||||
|
} else if (PayServer === "LIVE") {
|
||||||
|
fileName = "https://api.kiwoompay.co.kr/pay/linkEnc";
|
||||||
|
}
|
||||||
|
console.log("response fileName :::::", fileName);
|
||||||
|
if (PayType === "P") {
|
||||||
|
var KIWOOMPAY = window.open("", "KIWOOMPAY", "width=468,height=750");
|
||||||
|
pf.target = "KIWOOMPAY";
|
||||||
|
} else if (PayType === "M" || PayType === "W") {
|
||||||
|
pf.target = "_self";
|
||||||
|
}
|
||||||
|
|
||||||
|
pf.action = fileName;
|
||||||
|
pf.method = "post";
|
||||||
|
pf.submit();
|
||||||
|
} else {
|
||||||
|
alert("결제 정보를 가져오지 못했습니다.");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error : function(xhr, status, error) {
|
||||||
|
console.log("AJAX Error:", error);
|
||||||
|
alert("파일을 연동바랍니다.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%-- 공통 Header --%>
|
<%-- 공통 Header --%>
|
||||||
@@ -4428,6 +4520,138 @@
|
|||||||
</div>
|
</div>
|
||||||
</c:if>
|
</c:if>
|
||||||
<%-- kcp 결제 종료 --%>
|
<%-- kcp 결제 종료 --%>
|
||||||
|
|
||||||
|
<%-- 키움 결제 시작 --%>
|
||||||
|
<c:if test="${'03' eq payInfo.setleSetupTyCd}">
|
||||||
|
<div class="custom-radio is-medium">
|
||||||
|
<input type="radio" name="pg" id="pg06" value="kiwoom">
|
||||||
|
<label for="pg06">일반결제</label>
|
||||||
|
</div>
|
||||||
|
<div id="pg06Content" class="pgContent order-method-normal" <%-- style="display: none"--%>>
|
||||||
|
<div class="order-method-normal__btn-container">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<button type="button" name="01" id="card" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--card"></div>신용카드
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<button type="button" name="03" id="acount" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--transfer"></div>실시간 계좌이체
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<button type="button" name="04" id="virtual" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<button type="button" name="05" id="escrow-virtual" class="order-method-normal__btn not_multi_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--account"></div>가상계좌(에스크로)
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<button type="button" name="02" id="bank" class="order-method-normal__btn">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--deposit"></div>무통장
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<button type="button" name="10" id="payco" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--payco"></div>PAYCO
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<button type="button" name="tosspay" id="tosspay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--toss"></div>토스페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<button type="button" name="naverpay" id="naverpay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--naver"></div>네이버페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<button type="button" name="kakaopay" id="kakaopay" class="order-method-normal__btn gift_pay">
|
||||||
|
<div class="order-method-normal__icon order-method-normal__icon--kakao"></div>카카오페이
|
||||||
|
</button>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
<div class="order-method-normal__content-wrapper">
|
||||||
|
<c:if test="${'Y' eq payInfo.cardUseAt}">
|
||||||
|
<div id="card-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="card-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%--
|
||||||
|
<c:if test="${'Y' eq payInfo.rltmAcntUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
--%>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntUseAt}">
|
||||||
|
<div id="virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.virtlAcntEscwUseAt}">
|
||||||
|
<div id="escrow-virtual-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="escrow-virtual-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.nbkkUseAt}">
|
||||||
|
<div id="bank-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="bank-content-inner" class="order-method-normal__content-inner"></div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.paycoUseAt}">
|
||||||
|
<div id="payco-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="payco-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="infoBox noempty">
|
||||||
|
<h6 class="infoBox__title">PAYCO 간편결제 안내</h6>
|
||||||
|
<ol class="infoBox__list">
|
||||||
|
<li>PAYCO는 온/오프라인 쇼핑은 물론 송금, 멤버십 적립까지 가능한 통합 서비스입니다.</li>
|
||||||
|
<li>휴대폰과 카드 명의자가 동일해야 결제 가능하며, 결제금액 제한은 없습니다.
|
||||||
|
<br>- 지원카드: 모든 국내 신용/체크카드
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
<p class="textInfo noempty"><i class="icon icon_textInfo--sm"></i>발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.tpayUseAt}">
|
||||||
|
<div id="acount-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="acount-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<p class="fyi gray-7 mt-10 ml-10 noempty">발급정보 : 카드매출전표(또는 휴대폰결제전표)로 대체합니다.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.npayUseAt}">
|
||||||
|
<div id="naverpay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="naverpay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<c:if test="${'Y' eq payInfo.kpayUseAt}">
|
||||||
|
<div id="kakaopay-content" class="order-method-normal__content" style="display: none">
|
||||||
|
<div id="kakaopay-content-inner" class="order-method-normal__content-inner">
|
||||||
|
<div class="noempty">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</c:if>
|
||||||
|
<%-- kcp 결제 종료 --%>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,10 +34,7 @@
|
|||||||
const setleTyCd = orderForm.find('.setleTyCd').val();
|
const setleTyCd = orderForm.find('.setleTyCd').val();
|
||||||
const setleAmt = orderForm.find('.setleAmt').val();
|
const setleAmt = orderForm.find('.setleAmt').val();
|
||||||
const ordrInnb = orderForm.find('.ordrInnb').val();
|
const ordrInnb = orderForm.find('.ordrInnb').val();
|
||||||
const goodsNm = orderForm.find('.goodsNm').val();
|
|
||||||
const ordrrNm = orderForm.find('.ordrrNm').val();
|
const ordrrNm = orderForm.find('.ordrrNm').val();
|
||||||
const ordrrEmail = orderForm.find('.ordrrEmail').val();
|
|
||||||
const ordrrMbtlnb = orderForm.find('.ordrrMbtlnb').val().replace(/[^0-9]/g, '');
|
|
||||||
|
|
||||||
const sopmalCd = orderForm.find('.sopmalCd').val();
|
const sopmalCd = orderForm.find('.sopmalCd').val();
|
||||||
const mbrInnb = orderForm.find('.mbrInnb').val();
|
const mbrInnb = orderForm.find('.mbrInnb').val();
|
||||||
@@ -62,14 +59,13 @@
|
|||||||
console.log("HOMEURL:::"+ pf.HOMEURL.value);
|
console.log("HOMEURL:::"+ pf.HOMEURL.value);
|
||||||
console.log("FAILURL:::"+ pf.FAILURL.value);
|
console.log("FAILURL:::"+ pf.FAILURL.value);
|
||||||
|
|
||||||
init();
|
kiwoomPay();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var pf;
|
var pf;
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
//alert(navigator.userAgent);
|
|
||||||
pf = document.payForm;
|
pf = document.payForm;
|
||||||
pf.ORDERNO.value = getTimeStamp();
|
pf.ORDERNO.value = getTimeStamp();
|
||||||
}
|
}
|
||||||
@@ -165,52 +161,41 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form name="order_info" id="order_info" accept-charset="euc-kr">
|
<%-- Controller에 넘어가는 값 --%>
|
||||||
|
<form name="order_info" id="order_info">
|
||||||
<input type="hidden" name="sopmalCd" class="sopmalCd" value="${data.setle.sopmalCd}" />
|
<input type="hidden" name="sopmalCd" class="sopmalCd" value="${data.setle.sopmalCd}" />
|
||||||
<input type="hidden" name="ordrInnb" class="ordrInnb" value="${data.setle.ordrInnb}" />
|
<input type="hidden" name="ordrInnb" class="ordrInnb" value="${data.setle.ordrInnb}" />
|
||||||
<input type="hidden" name="pgCmpnyNm" class="pgCmpnyNm" value="${data.setle.pgCmpnyNm}" />
|
<input type="hidden" name="pgCmpnyNm" class="pgCmpnyNm" value="${data.setle.pgCmpnyNm}" />
|
||||||
<input type="hidden" name="setleTyCd" class="setleTyCd" value="${data.setle.setleTyCd}" />
|
<input type="hidden" name="setleTyCd" class="setleTyCd" value="${data.setle.setleTyCd}" />
|
||||||
|
|
||||||
<input type="hidden" name="SERVER" class="SERVER" value="DEV"/> <!-- 서버환경 : LIVE -->
|
<input type="hidden" name="goodsNm" class="goodsNm" value="${data.setle.goodsNm}"/> <!-- 상품명 -->
|
||||||
<input type="hidden" name="TYPE" class="TYPE" value="${data.setle.setleAmt}"/> <!-- 결제방식(P:PC/M:모바일/W:웹뷰) -->
|
<input type="hidden" name="setleAmt" class="setleAmt" value="${data.setle.setleAmt}"/> <!-- 결제 금액 -->
|
||||||
<input type="hidden" name="PAYMETHOD" class="PAYMETHOD" value="${data.ordr.ordrrNm}"/> <!-- 결제수단 -->
|
<input type="hidden" name="ordrrNm" class="ordrrNm" value="${data.ordr.ordrrNm}"/> <!-- 주문자 이름 -->
|
||||||
<input type="hidden" name="TAXFREECD" class="TAXFREECD" value="00"/> <!-- 과세 비과세 여부(00: 과세, 01: 비과세, 02: 복합과세) -->
|
<input type="hidden" name="ordrrEmail" class="ordrrEmail" value="${data.ordr.ordrrEmail}"/> <!-- 주문자 이메일 -->
|
||||||
<input type="hidden" name="BILLTYPE" class="BILLTYPE" value="1"/> <!-- 과금 유형(1: 일반) -->
|
<input type="hidden" name="ordrrMbtlnb" class="ordrrMbtlnb" value="${data.ordr.ordrrMbtlnb}"/> <!-- 주문자 휴대폰번호 -->
|
||||||
<input type="hidden" name="KIWOOM_ENC" class="KIWOOM_ENC" value="${data.ordr.ordrrNm}"/> <!-- 보안 기능 -->
|
<input type="hidden" name="mbrId" class="mbrId" value="${data.ordr.mbrId}"/> <!-- 쇼핑몰회원ID -->
|
||||||
|
<input type="hidden" name="mbrInnb" class="mbrInnb" value="${data.ordr.mbrInnb}" />
|
||||||
|
<input type="hidden" name="sesionId" class="sesionId" value="${data.ordr.sesionId}" />
|
||||||
|
</form>
|
||||||
|
|
||||||
<input type="hidden" name="CPID" class="CPID" value="${data.ordr.ordrrEmail}"/> <!-- 상점아이디 -->
|
<%-- 결제창에 넘어가는 값 --%>
|
||||||
<input type="hidden" name="ORDERNO" class="ORDERNO" value="${data.ordr.ordrrMbtlnb}"/> <!-- 주문번호 -->
|
<form name="payForm" accept-charset="euc-kr">
|
||||||
<input type="hidden" name="PRODUCTTYPE" class="PRODUCTTYPE" value="${data.ordr.mbrId}"/> <!-- 상품구분(1: 디지털, 2: 실물) -->
|
<input type="hidden" name="SERVER" value="DEV"/> <!-- 서버환경 : LIVE -->
|
||||||
<input type="hidden" name="AMOUNT" class="AMOUNT" value="${data.ordr.mbrInnb}" /><!-- 결제금액 -->
|
<input type="hidden" name="TAXFREECD" value="01"/> <!-- 과세 비과세 여부(00: 과세, 01: 비과세, 02: 복합과세) -->
|
||||||
<input type="hidden" name="PRODUCTNAME" class="PRODUCTNAME" value="${data.ordr.sesionId}" /><!-- 상품명 -->
|
<input type="hidden" name="BILLTYPE" value="1"/> <!-- 과금 유형(1: 일반) -->
|
||||||
<input type="hidden" name="USERID" class="USERID" value="${data.setle.dueDt}" /> <!-- 고객 ID -->
|
<input type="hidden" name="PRODUCTTYPE" value="2"/> <!-- 상품구분(1: 디지털, 2: 실물) -->
|
||||||
|
<input type="hidden" name="KIWOOM_ENC" value=""/> <!-- 보안 기능 -->
|
||||||
|
|
||||||
<input type="hidden" name="HOMEURL" class="HOMEURL" value="${data.setle.dueDt}" /> <!-- 결제 성공 후, 이동할 URL(결제 창에서 이동) -->
|
<input type="hidden" name="TYPE" value="P"/> <!-- 결제방식(P:PC/M:모바일/W:웹뷰) -->
|
||||||
<input type="hidden" name="FAILURL" class="FAILURL" value="${data.setle.dueDt}" /> <!-- 결제실패 후, 확인버튼 입력 시 이동할 URL -->
|
<input type="hidden" name="CPID" value="CFO20585"/> <!-- 상점아이디 CFO20585,CFO20586-->
|
||||||
|
<input type="hidden" name="PAYMETHOD" value="CARD"/> <!-- 결제수단 (CARD:카드/NAVERPAY:네이버페이)-->
|
||||||
|
|
||||||
<!--
|
<input type="hidden" name="ORDERNO" value="${data.setle.ordrInnb}"/> <!-- 주문번호 -->
|
||||||
payVO.setOrderId(request.getParameter("orderId"));
|
<input type="hidden" name="AMOUNT" value="${data.setle.setleAmt}" /><!-- 결제금액 -->
|
||||||
payVO.setPaymentKey(request.getParameter("paymentKey"));
|
<input type="hidden" name="PRODUCTNAME" value="${data.setle.goodsNm}" /><!-- 상품명 -->
|
||||||
payVO.setAmount(request.getParameter("amount"));
|
<input type="hidden" name="USERID" value="${data.ordr.mbrId}" /> <!-- 고객 ID -->
|
||||||
|
<input type="hidden" name="HOMEURL" value="" /> <!-- 결제 성공 후, 이동할 URL(결제 창에서 이동) -->
|
||||||
payVO.setSopmalCd(request.getParameter("sopmalCd"));
|
<input type="hidden" name="FAILURL" value="" /> <!-- 결제실패 후, 확인버튼 입력 시 이동할 URL -->
|
||||||
payVO.setMbrInnb(request.getParameter("mbrInnb"));
|
|
||||||
payVO.setMbrId(request.getParameter("mbrId"));
|
|
||||||
payVO.setSesionId(request.getParameter("sesionId"));
|
|
||||||
payVO.setPgCmpnyNm(request.getParameter("pgCmpnyNm"));
|
|
||||||
payVO.setSetleTyCd(request.getParameter("setleTyCd"));
|
|
||||||
payVO.setSetlerNm(request.getParameter("ordrrNm"));
|
|
||||||
|
|
||||||
|
|
||||||
let param = '?sopmalCd=' + sopmalCd;
|
|
||||||
param += '&mbrInnb=' + mbrInnb;
|
|
||||||
param += '&mbrId=' + mbrId;
|
|
||||||
param += '&sesionId=' + sesionId;
|
|
||||||
param += '&pgCmpnyNm=' + pgCmpnyNm;
|
|
||||||
param += '&setleTyCd=' + setleTyCd;
|
|
||||||
param += '&ordrrNm=' + ordrrNm;
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user