Compare commits
2 Commits
1df2a1ab65
...
7e98b7acfb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e98b7acfb | ||
|
|
0c2be2d1d2 |
@@ -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) {
|
||||||
@@ -2839,8 +2781,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);
|
||||||
@@ -3430,10 +3370,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") : "");
|
||||||
@@ -3867,6 +3803,11 @@ public class BOOrdrService{
|
|||||||
return orderService.insertMngrOrdrRegist(param, MemberJwtContextHolder.getMemberInfo());
|
return orderService.insertMngrOrdrRegist(param, MemberJwtContextHolder.getMemberInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
무통장 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 무통장 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 무통장 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -3936,55 +3877,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) {
|
||||||
@@ -4008,6 +3900,11 @@ public class BOOrdrService{
|
|||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
KCP 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 거래등록 정보 조회
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 거래등록 정보 조회
|
||||||
* @param param
|
* @param param
|
||||||
@@ -4071,63 +3968,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);
|
||||||
@@ -4148,23 +3997,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)
|
||||||
@@ -4410,6 +4242,10 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSS 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -4465,60 +4301,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);
|
||||||
@@ -4556,24 +4342,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"); //카드결제(일반카드, 간편결제카드, 간편결제카드+적립식)
|
||||||
|
|
||||||
@@ -4855,6 +4623,9 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSSPAY 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSSPAY 결제 정보 등록
|
||||||
@@ -4871,17 +4642,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
|
||||||
@@ -4916,62 +4676,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);
|
||||||
@@ -5210,6 +4919,10 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
KCP 카드 수기 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 카드 수기 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > KCP 카드 수기 결제 정보 등록
|
||||||
* @param payVO
|
* @param payVO
|
||||||
@@ -5260,59 +4973,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);
|
||||||
@@ -5326,24 +4990,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")));
|
||||||
@@ -5519,6 +5165,9 @@ public class BOOrdrService{
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
TOSS 카드 수기 결제 정보 등록
|
||||||
|
================================================== */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 카드 수기 결제 정보 등록
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > TOSS 카드 수기 결제 정보 등록
|
||||||
@@ -5568,59 +5217,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);
|
||||||
@@ -5653,27 +5253,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)) {
|
||||||
@@ -5856,6 +5435,147 @@ 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()));
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle service start ::: ");
|
||||||
|
|
||||||
|
// 주문 공통 전처리 ( 상태체크, 상태변경, 마일리지, 쿠폰, GC머니 )
|
||||||
|
orderCommService.commonOrderPreProcess(payVO, orderVO);
|
||||||
|
|
||||||
|
/* ===============================================
|
||||||
|
결제 API >> DB select로 진행함
|
||||||
|
================================================== */
|
||||||
|
// todo :: api 연결이 아닌 db셀렉트로 변경.
|
||||||
|
DataMap kiwoomPayMap = mapper.selectKiwoomPgApiLog(payVO);//payService.insertTossPayKeyin(payVO);
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle service kiwoomPayMap ::: {}", kiwoomPayMap);
|
||||||
|
|
||||||
|
if (!CollectionUtils.isEmpty(kiwoomPayMap)) {
|
||||||
|
String response = StringUtil.isNullToString(kiwoomPayMap.get("rsltParam"));
|
||||||
|
log.info("insertKiwoomSetle service kiwoomPayMap_response ::: {}", response);
|
||||||
|
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("KIWOOM_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("CTS18056"); //todo : paylink 관련 정리 후 db형으로 바꿈
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle service kiwoomPayMap_orderSetleVO ::: {}", orderSetleVO);
|
||||||
|
|
||||||
|
purchsMapper.updateOrderSetle(orderSetleVO);
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle service kiwoomPayMap_orderSetleVO end::: ");
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6023,6 +5743,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
|
||||||
@@ -6714,7 +6445,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 사용자 > 상품 > 상품상세 > 기존 장바구니 상품정보 삭제
|
* 사용자 > 상품 > 상품상세 > 기존 장바구니 상품정보 삭제
|
||||||
* @param goodsVOList
|
* @param spbkVO
|
||||||
* @return Map<String, Object>
|
* @return Map<String, Object>
|
||||||
*/
|
*/
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -7201,7 +6932,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();
|
||||||
@@ -7600,7 +7331,7 @@ public class BOOrdrService{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 주문 메세지 처리
|
* 주문 메세지 처리
|
||||||
* @param payVO
|
* @param orderVO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public void selectBOOrdrMssageSndngProcs (BOOrderVO orderVO) throws Exception {
|
public void selectBOOrdrMssageSndngProcs (BOOrderVO orderVO) throws Exception {
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import com.wb.domainserver.domain.gcone.ordr.ordr.service.BOOrdrService;
|
|||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOCrmDlvylcVO;
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOCrmDlvylcVO;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrVO;
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOOrdrVO;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOSpbkVO;
|
import com.wb.domainserver.domain.gcone.ordr.ordr.vo.BOSpbkVO;
|
||||||
|
import com.wb.domainserver.domain.gcone.ordr.pay.service.BOPayService;
|
||||||
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
import com.wb.domainserver.domain.gcone.ordr.pay.vo.BOPayVO;
|
||||||
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
import com.wb.domainserver.domain.gcone.promtn.coupon.service.BOCouponService;
|
||||||
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
import com.wb.domainserver.domain.gcone.setup.dlvygrp.service.BODlvygrpService;
|
||||||
@@ -133,6 +134,8 @@ public class OrdrController {
|
|||||||
private BOPurchsService boPurchsService;
|
private BOPurchsService boPurchsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private BOSubsvcService subsvcService;
|
private BOSubsvcService subsvcService;
|
||||||
|
@Autowired
|
||||||
|
private BOPayService payService;
|
||||||
|
|
||||||
/* ####################################
|
/* ####################################
|
||||||
사용자 > 상품 > 구매/결제 > 회원구매하기 시작
|
사용자 > 상품 > 구매/결제 > 회원구매하기 시작
|
||||||
@@ -834,7 +837,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)) {
|
||||||
@@ -1182,19 +1187,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");
|
||||||
@@ -1392,6 +1384,154 @@ public class OrdrController {
|
|||||||
return "sopmal/ordr/OrdrRspnsTossPayR";
|
return "sopmal/ordr/OrdrRspnsTossPayR";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 키움 결제 연계 전 getEnc 값 받아오기
|
||||||
|
* @return PayKiwoomSucsC.jsp
|
||||||
|
* @author 이경숙
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@ResponseBody
|
||||||
|
@RequestMapping(value="/kiwoomPayGetEnc")
|
||||||
|
public Map<String, Object> selectKiwoomGetEnc(HttpServletRequest request) throws Exception {
|
||||||
|
|
||||||
|
BOPayVO payVO = new BOPayVO();
|
||||||
|
|
||||||
|
log.debug("kiwoomPayGetEnc = {}");
|
||||||
|
|
||||||
|
//String eucKrStr = new String(utf8Str.getBytes("UTF-8"), "EUC-KR");
|
||||||
|
//String utf8Str = new String(eucKrStr.getBytes("EUC-KR"), "UTF-8");
|
||||||
|
//request.setCharacterEncoding("EUC-KR");
|
||||||
|
|
||||||
|
payVO.setCpId(request.getParameter("CPID"));
|
||||||
|
payVO.setPayMethod(request.getParameter("PAYMETHOD"));
|
||||||
|
payVO.setOrderId(request.getParameter("ORDERNO"));
|
||||||
|
payVO.setType(request.getParameter("TYPE"));
|
||||||
|
payVO.setAmount(request.getParameter("AMOUNT"));
|
||||||
|
|
||||||
|
Map<String, Object> message;
|
||||||
|
String sopmalCd = payVO.getSopmalCd();
|
||||||
|
try {
|
||||||
|
message = payService.insertKiwoomPay(payVO);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
message = new HashMap<>() {{
|
||||||
|
put("response", "결제를 실패하였습니다.\n관리자에게 문의하시기 바랍니다.");
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log.info("insertKiwoomPay step5 ::: {}", message.get("KIWOOM_ENC"));
|
||||||
|
|
||||||
|
//model.addAttribute("message", message);
|
||||||
|
//return "sopmal/ordr/PayKiwoomSucsC";
|
||||||
|
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 사용자 > 상품 > 구매/결제 > 회원구매하기 > 키움 결제 정보 등록
|
||||||
|
* @param model
|
||||||
|
* @param request
|
||||||
|
* @return OrdrRspnsKiwoomPayR.jsp
|
||||||
|
*/
|
||||||
|
@Policy(AuthPolicy.RESTRICTED)
|
||||||
|
@RequestMapping(value="/insertKiwoomSetle")
|
||||||
|
public String insertKiwoomSetle(ModelMap model, HttpServletRequest request) {
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle controller start ::: ");
|
||||||
|
|
||||||
|
BOPayVO payVO = new BOPayVO();
|
||||||
|
|
||||||
|
payVO.setOrderId(request.getParameter("ordrInnb"));
|
||||||
|
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"));
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle controller payVO ::: {}", payVO);
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
|
log.info("insertKiwoomSetle controller content ::: {}", content);
|
||||||
|
|
||||||
|
} 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
|
||||||
|
|||||||
@@ -5784,6 +5784,15 @@
|
|||||||
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 = #{orderId}
|
||||||
|
</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';
|
let 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,11 +528,16 @@
|
|||||||
|
|
||||||
$(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);
|
||||||
|
|
||||||
if ('pg01' === id || 'pg02' === id) {
|
if ('pg01' === id || 'pg02' === id) { //GC페이
|
||||||
if ('pg02' === id) {
|
if ('pg02' === id) {
|
||||||
$('#gc-pay-bank-cash-receipt').prop('checked', true).trigger("click");
|
$('#gc-pay-bank-cash-receipt').prop('checked', true).trigger("click");
|
||||||
|
|
||||||
@@ -549,7 +557,7 @@
|
|||||||
$(form).find('#setleTyCd').val('pg01' === id ? '01' : '03');
|
$(form).find('#setleTyCd').val('pg01' === id ? '01' : '03');
|
||||||
|
|
||||||
$('.bankSlideW, .cardSlideW').slick('setPosition');
|
$('.bankSlideW, .cardSlideW').slick('setPosition');
|
||||||
} else if('pg05' === id){
|
} else if('pg05' === id){ //퀵계좌이체
|
||||||
$('#transfer-cash-receipt').prop('checked', true).trigger("click");
|
$('#transfer-cash-receipt').prop('checked', true).trigger("click");
|
||||||
|
|
||||||
$(form).find('#transfer-cash-receipt').on('click', function () {
|
$(form).find('#transfer-cash-receipt').on('click', function () {
|
||||||
@@ -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');
|
||||||
@@ -2987,7 +2998,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm) {
|
if ('kcp' === pgCmpnyNm || 'toss' === pgCmpnyNm || 'kiwoom' === pgCmpnyNm) {
|
||||||
const div = $('#setleForm').find('.order-method-normal');
|
const div = $('#setleForm').find('.order-method-normal');
|
||||||
|
|
||||||
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
if (!$(div).find('.order-method-normal__btn-container button').hasClass('active')) {
|
||||||
@@ -3028,7 +3039,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'
|
||||||
@@ -3077,7 +3093,7 @@
|
|||||||
|
|
||||||
$('#setleForm').find('#pgCmpnyNm').val(pgCmpnyNm);
|
$('#setleForm').find('#pgCmpnyNm').val(pgCmpnyNm);
|
||||||
$('#setleForm').find('#setleTyCd').val(setleTyCd);
|
$('#setleForm').find('#setleTyCd').val(setleTyCd);
|
||||||
} else {
|
} else { //gc페이
|
||||||
if ('01' === setleTyCd) { // 카드
|
if ('01' === setleTyCd) { // 카드
|
||||||
const index = $('.cardSlideW').slick('slickCurrentSlide');
|
const index = $('.cardSlideW').slick('slickCurrentSlide');
|
||||||
const curCardId = $('#gcCardId' + index).val();
|
const curCardId = $('#gcCardId' + index).val();
|
||||||
@@ -3387,38 +3403,6 @@
|
|||||||
fn_get_setle_amt();
|
fn_get_setle_amt();
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/****************************************************************/
|
|
||||||
/* m_Completepayment 설명 */
|
|
||||||
/****************************************************************/
|
|
||||||
/* 인증완료시 재귀 함수 */
|
|
||||||
/* 해당 함수명은 절대 변경하면 안됩니다. */
|
|
||||||
/* 해당 함수의 위치는 kcp_spay_hub.js 보다먼저 선언되어여 합니다. */
|
|
||||||
/* Web 방식의 경우 리턴 값이 form 으로 넘어옴 */
|
|
||||||
/****************************************************************/
|
|
||||||
function m_Completepayment(FormOrJson, closeEvent) {
|
|
||||||
var frm = document.order_info;
|
|
||||||
|
|
||||||
/********************************************************************/
|
|
||||||
/* FormOrJson은 가맹점 임의 활용 금지 */
|
|
||||||
/* frm 값에 FormOrJson 값이 설정 된 frm 값으로 활용 하셔야 됩니다. */
|
|
||||||
/********************************************************************/
|
|
||||||
GetField(frm, FormOrJson);
|
|
||||||
|
|
||||||
if (frm.res_cd.value == "0000"){
|
|
||||||
/* 결제인증 완료 후 결제승인 요청을 위한 비즈니스 로직 구현 */
|
|
||||||
frm.submit();
|
|
||||||
} else {
|
|
||||||
/* 결제인증 실패에 대한 처리 */
|
|
||||||
alert( "[" + frm.res_cd.value + "] " + frm.res_msg.value );
|
|
||||||
|
|
||||||
location.reload();
|
|
||||||
|
|
||||||
closeEvent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 약관 상세 보기, 마케팅동의여부 모달 데이터 정제*/
|
/* 약관 상세 보기, 마케팅동의여부 모달 데이터 정제*/
|
||||||
const fn_select_clause = (stplatDvCd,agreeAt) => {
|
const fn_select_clause = (stplatDvCd,agreeAt) => {
|
||||||
@@ -3481,6 +3465,38 @@
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/****************************************************************/
|
||||||
|
/* m_Completepayment 설명 */
|
||||||
|
/****************************************************************/
|
||||||
|
/* 인증완료시 재귀 함수 */
|
||||||
|
/* 해당 함수명은 절대 변경하면 안됩니다. */
|
||||||
|
/* 해당 함수의 위치는 kcp_spay_hub.js 보다먼저 선언되어여 합니다. */
|
||||||
|
/* Web 방식의 경우 리턴 값이 form 으로 넘어옴 */
|
||||||
|
/****************************************************************/
|
||||||
|
function m_Completepayment(FormOrJson, closeEvent) {
|
||||||
|
var frm = document.order_info;
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/* FormOrJson은 가맹점 임의 활용 금지 */
|
||||||
|
/* frm 값에 FormOrJson 값이 설정 된 frm 값으로 활용 하셔야 됩니다. */
|
||||||
|
/********************************************************************/
|
||||||
|
GetField(frm, FormOrJson);
|
||||||
|
|
||||||
|
if (frm.res_cd.value == "0000"){
|
||||||
|
/* 결제인증 완료 후 결제승인 요청을 위한 비즈니스 로직 구현 */
|
||||||
|
frm.submit();
|
||||||
|
} else {
|
||||||
|
/* 결제인증 실패에 대한 처리 */
|
||||||
|
alert( "[" + frm.res_cd.value + "] " + frm.res_msg.value );
|
||||||
|
|
||||||
|
location.reload();
|
||||||
|
|
||||||
|
closeEvent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<c:choose>
|
<c:choose>
|
||||||
<c:when test="${data.payInfo.kcpMid eq 'T0007'}">
|
<c:when test="${data.payInfo.kcpMid eq 'T0007'}">
|
||||||
<script type="text/javascript" src="https://testspay.kcp.co.kr/plugin/kcp_spay_hub.js"></script>
|
<script type="text/javascript" src="https://testspay.kcp.co.kr/plugin/kcp_spay_hub.js"></script>
|
||||||
@@ -3524,6 +3540,98 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</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("파일을 연동바랍니다.");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function kiwoom_Completepayment() {
|
||||||
|
|
||||||
|
console.log("::: parent window 호출 됨 ::::");
|
||||||
|
var frm = document.order_info;
|
||||||
|
frm.submit();
|
||||||
|
|
||||||
|
/*if (frm.res_cd.value == "0000"){
|
||||||
|
/!* 결제인증 완료 후 결제승인 요청을 위한 비즈니스 로직 구현 *!/
|
||||||
|
frm.submit();
|
||||||
|
} else {
|
||||||
|
/!* 결제인증 실패에 대한 처리 *!/
|
||||||
|
alert( "[" + frm.res_cd.value + "] " + frm.res_msg.value );
|
||||||
|
location.reload();
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<%-- 공통 Header --%>
|
<%-- 공통 Header --%>
|
||||||
@@ -4437,6 +4545,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>
|
||||||
|
<%-- 키움 결제 종료 --%>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,15 +29,12 @@
|
|||||||
|
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
/*
|
||||||
const orderForm = $('#order_info');
|
const orderForm = $('#order_info');
|
||||||
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();
|
||||||
@@ -55,25 +52,25 @@
|
|||||||
param += '&orderId=' + ordrInnb;
|
param += '&orderId=' + ordrInnb;
|
||||||
param += '&setleAmt=' + setleAmt;
|
param += '&setleAmt=' + setleAmt;
|
||||||
|
|
||||||
|
console.log("param:::"+ param);
|
||||||
|
|
||||||
const encodedParam = encodeURIComponent(param);
|
const encodedParam = encodeURIComponent(param);
|
||||||
pf.HOMEURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPaySuccss"/>' + encodedParam;
|
|
||||||
pf.FAILURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPayFail"/>'+ encodedParam;
|
|
||||||
|
|
||||||
console.log("HOMEURL:::"+ pf.HOMEURL.value);
|
console.log("encodedParam:::"+ encodedParam);
|
||||||
console.log("FAILURL:::"+ pf.FAILURL.value);
|
|
||||||
|
|
||||||
init();
|
document.payForm.HOMEURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPaySuccss"/>' + encodedParam;
|
||||||
|
document.payForm.FAILURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPayFail"/>'+ encodedParam;
|
||||||
|
*/
|
||||||
|
|
||||||
|
document.payForm.HOMEURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPaySuccss"/>';
|
||||||
|
document.payForm.FAILURL.value=window.location.origin + '<c:url value="/sopmal/pay/kiwoomPayFail"/>';
|
||||||
|
|
||||||
|
console.log("HOMEURL:::"+ document.payForm.HOMEURL.value);
|
||||||
|
console.log("FAILURL:::"+ document.payForm.FAILURL.value);
|
||||||
|
|
||||||
|
kiwoomPay();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var pf;
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
//alert(navigator.userAgent);
|
|
||||||
pf = document.payForm;
|
|
||||||
pf.ORDERNO.value = getTimeStamp();
|
|
||||||
}
|
|
||||||
|
|
||||||
function pay() {
|
function pay() {
|
||||||
pf = document.payForm;
|
pf = document.payForm;
|
||||||
|
|
||||||
@@ -84,7 +81,7 @@
|
|||||||
var TYPE = pf.TYPE.value;
|
var TYPE = pf.TYPE.value;
|
||||||
var AMOUNT = pf.AMOUNT.value;
|
var AMOUNT = pf.AMOUNT.value;
|
||||||
|
|
||||||
const url = '<c:url value="/sopmal/pay/kiwoomPayGetEnc"/>';
|
const url = '<c:url value="/sopmal/ordr/kiwoomPayGetEnc"/>';
|
||||||
|
|
||||||
// AJAX로 kiwoom_ENC 값 요청
|
// AJAX로 kiwoom_ENC 값 요청
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -144,74 +141,45 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTimeStamp() {
|
|
||||||
var d = new Date();
|
|
||||||
var month = d.getMonth() + 1
|
|
||||||
var date = d.getDate()
|
|
||||||
var hour = d.getHours()
|
|
||||||
var minute = d.getMinutes()
|
|
||||||
var second = d.getSeconds()
|
|
||||||
|
|
||||||
month = (month < 10 ? "0" : "") + month;
|
|
||||||
date = (date < 10 ? "0" : "") + date;
|
|
||||||
hour = (hour < 10 ? "0" : "") + hour;
|
|
||||||
minute = (minute < 10 ? "0" : "") + minute;
|
|
||||||
second = (second < 10 ? "0" : "") + second;
|
|
||||||
|
|
||||||
var s = d.getFullYear() + month + date + hour + minute + second
|
|
||||||
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
</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" method="post" action="<c:url value="/sopmal/ordr/insertKiwoomSetle"/>">
|
||||||
<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.wonSetleAmt}"/> <!-- 결제 금액 -->
|
||||||
<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="CTS18056"/> <!-- 상점아이디 개발:CTS18056 / 운영:CFO20585,CFO20586-->
|
||||||
|
<input type="hidden" name="PAYMETHOD" value="CARD"/> <!-- 결제수단 (CARD:카드/NAVERPAY:네이버페이)-->
|
||||||
<!--
|
|
||||||
payVO.setOrderId(request.getParameter("orderId"));
|
|
||||||
payVO.setPaymentKey(request.getParameter("paymentKey"));
|
|
||||||
payVO.setAmount(request.getParameter("amount"));
|
|
||||||
|
|
||||||
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"));
|
|
||||||
|
|
||||||
|
|
||||||
let param = '?sopmalCd=' + sopmalCd;
|
|
||||||
param += '&mbrInnb=' + mbrInnb;
|
|
||||||
param += '&mbrId=' + mbrId;
|
|
||||||
param += '&sesionId=' + sesionId;
|
|
||||||
param += '&pgCmpnyNm=' + pgCmpnyNm;
|
|
||||||
param += '&setleTyCd=' + setleTyCd;
|
|
||||||
param += '&ordrrNm=' + ordrrNm;
|
|
||||||
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
<input type="hidden" name="ORDERNO" value="${data.setle.ordrInnb}"/> <!-- 주문번호 -->
|
||||||
|
<input type="hidden" name="AMOUNT" value="${data.setle.wonSetleAmt}" /><!-- 결제금액 -->
|
||||||
|
<input type="hidden" name="PRODUCTNAME" value="${data.setle.goodsNm}" /><!-- 상품명 -->
|
||||||
|
<input type="hidden" name="USERID" value="${data.ordr.mbrId}" /> <!-- 고객 ID -->
|
||||||
|
<input type="hidden" name="HOMEURL" value="" /> <!-- 결제 성공 후, 이동할 URL(결제 창에서 이동) -->
|
||||||
|
<input type="hidden" name="FAILURL" value="" /> <!-- 결제실패 후, 확인버튼 입력 시 이동할 URL -->
|
||||||
|
<input type="hidden" name="DIRECTRESULTFLAG" value="" /> <!-- 키움페이 결제 완료 창 없이 HOMEURL로 바로 이동(Y/N) -->
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||||
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||||
|
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
|
||||||
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
|
||||||
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||||
|
<%@ taglib prefix="ui" uri="http://www.winbit.kr/ctl/ui"%>
|
||||||
|
<%@ taglib prefix="f" uri="/WEB-INF/tlds/f.tld"%>
|
||||||
|
|
||||||
|
<%--
|
||||||
|
Class Name : OrdrPay.jsp
|
||||||
|
Description : 결제
|
||||||
|
Modification Information
|
||||||
|
|
||||||
|
수정일 수정자 수정내용
|
||||||
|
------- -------- ---------------------------
|
||||||
|
2024-04-11 김혜인 최초 생성
|
||||||
|
--%>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ko">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
|
||||||
|
<%-- 공통 include --%>
|
||||||
|
<jsp:include page="/WEB-INF/views/comm/Include.jsp"/>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
//alert($('#message').val());
|
||||||
|
|
||||||
|
const status = $('#status').val();
|
||||||
|
|
||||||
|
if ('0' === status) {
|
||||||
|
let form = $('<form></form>');
|
||||||
|
|
||||||
|
$(form).attr('method', 'post');
|
||||||
|
$(form).attr('action', '<c:url value="/sopmal/ordr/selectOrdrCompt"/>');
|
||||||
|
history.replaceState(null, '', '/sopmal/ordr/selectOrdrCompt');
|
||||||
|
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'sopmalCd', value:$('#sopmalCd').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'ordrInnb', value:$('#ordrInnb').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'message', value:$('#message').val()}));
|
||||||
|
|
||||||
|
$(form).appendTo('body');
|
||||||
|
$(form).submit();
|
||||||
|
} else {
|
||||||
|
const form = $('<form></form>');
|
||||||
|
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'sopmalCd', value:$('#sopmalCd').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'ordrInnb', value:$('#ordrInnb').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'mbrInnb', value:$('#mbrInnb').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'mbrId', value:$('#mbrId').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'sesionId', value:$('#sesionId').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'message', value:$('#message').val()}));
|
||||||
|
$(form).append($('<input/>', {type:'hidden', name:'subsvcInnb', value:$('#subsvcInnb').val()}));
|
||||||
|
|
||||||
|
$(form).attr('method', 'post');
|
||||||
|
$(form).attr('action', '<c:url value="/sopmal/ordr/selectOrdrFailr"/>');
|
||||||
|
history.replaceState(null, '', '/sopmal/ordr/selectOrdrFailr');
|
||||||
|
|
||||||
|
$(form).appendTo('body');
|
||||||
|
$(form).submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<form name="successForm" id="successForm">
|
||||||
|
<input type="hidden" name="status" id="status" value="${data.status}"/>
|
||||||
|
<input type="hidden" name="message" id="message" value="${data.message}"/>
|
||||||
|
<input type="hidden" name="sopmalCd" id="sopmalCd" value="${paramVO.sopmalCd}"/>
|
||||||
|
<input type="hidden" name="ordrInnb" id="ordrInnb" value="${paramVO.orderId}"/>
|
||||||
|
<input type="hidden" name="mbrInnb" id="mbrInnb" value="${paramVO.mbrInnb}"/>
|
||||||
|
<input type="hidden" name="mbrId" id="mbrId" value="${paramVO.mbrId}"/>
|
||||||
|
<input type="hidden" name="sesionId" id="sesionId" value="${paramVO.sesionId}"/>
|
||||||
|
<input type="hidden" name="subsvcInnb" id="subsvcInnb" value="${subsvcInnb}"/>
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -51,6 +51,8 @@
|
|||||||
<p>메세지 : <span id="resMessage"></span></p>
|
<p>메세지 : <span id="resMessage"></span></p>
|
||||||
<p>결과코드 : <span id="resCode"></span><p>
|
<p>결과코드 : <span id="resCode"></span><p>
|
||||||
|
|
||||||
|
<input type="button" onclick="window.opener.kiwoom_Completepayment(); self.close();" value="확인"/>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user