|
|
@ -100,19 +100,17 @@ public class NiceCiAcceptService {
|
|
|
|
d.setInputDataXits(niceCiMapper.selectNiceCiAcceptDatas(niceCiParam));
|
|
|
|
d.setInputDataXits(niceCiMapper.selectNiceCiAcceptDatas(niceCiParam));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
//List<NiceCiDTO.BillDTO> bills = new ArrayList<>();
|
|
|
|
|
|
|
|
//List<NiceCiDTO.BillKkoDTO> billKkos = new ArrayList<>();
|
|
|
|
|
|
|
|
final String prefixBillUid = PostSeCd.intgrnNoti.getCode() + "-" + IdGenerator.getCurrentTimeSec();
|
|
|
|
|
|
|
|
final String expireAt = DateUtil.getTodayAndNowTime("YYYYMMddHHmmss");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final String prefixBillUid = PostSeCd.intgrnNoti.getCode() + "-" + IdGenerator.getCurrentTimeSec();
|
|
|
|
final KkoPayUrlRespData kkoPayUrlRespData = KkoPayUrlRespData.builder()
|
|
|
|
final KkoPayUrlRespData kkoPayUrlRespData = KkoPayUrlRespData.builder()
|
|
|
|
.customUrl(CustomUrl.builder()
|
|
|
|
.customUrl(CustomUrl.builder()
|
|
|
|
.noticeUrl(BILL_HOST + BILL_NOTICE_URL)
|
|
|
|
.noticeUrl(BILL_HOST + BILL_NOTICE_URL)
|
|
|
|
.prepayUrl(BILL_HOST + BILL_PREPAY_URL)
|
|
|
|
.prepayUrl(BILL_HOST + BILL_PREPAY_URL)
|
|
|
|
.payResultUrl(BILL_HOST + BILL_PAYREUSLT_URL)
|
|
|
|
.payResultUrl(BILL_HOST + BILL_PAYREUSLT_URL)
|
|
|
|
.build())
|
|
|
|
.build())
|
|
|
|
.expireAt(expireAt)
|
|
|
|
.expireAt(DateUtil.getStringFromLocalDate(list.get(0).getExpiresDt(), "yyyyMMddHHmmss"))
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
final OrgMng orgMng = niceCiMapper.selectKkoBpApiUrlFromEnsOrgMng(list.get(0).getOrgCd())
|
|
|
|
final OrgMng orgMng = niceCiMapper.selectKkoBpApiUrlFromEnsOrgMng(list.get(0).getOrgCd())
|
|
|
|
.orElseThrow(() -> new EnsException(EnsErrCd.NO_DATA_FOUND, EnsErrCd.NO_DATA_FOUND.getCodeNm()));
|
|
|
|
.orElseThrow(() -> new EnsException(EnsErrCd.NO_DATA_FOUND, EnsErrCd.NO_DATA_FOUND.getCodeNm()));
|
|
|
|
|
|
|
|
|
|
|
@ -121,7 +119,7 @@ public class NiceCiAcceptService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
List<NiceCiDTO.InputDataXit> inputDataXits = xit.getInputDataXits();
|
|
|
|
List<NiceCiDTO.InputDataXit> inputDataXits = xit.getInputDataXits();
|
|
|
|
for (NiceCiDTO.InputDataXit data : inputDataXits) {
|
|
|
|
for (NiceCiDTO.InputDataXit data : inputDataXits) {
|
|
|
|
BillKkoApiRespDTO<?> respDTO = getPayUrl(xit, data, billHistDTO, orgMng, kkoPayUrlRespData);
|
|
|
|
BillKkoApiRespDTO<?> respDTO = getPayUrl(data, billHistDTO, orgMng, kkoPayUrlRespData);
|
|
|
|
|
|
|
|
|
|
|
|
data.setPayUrl(String.valueOf(respDTO.getData()));
|
|
|
|
data.setPayUrl(String.valueOf(respDTO.getData()));
|
|
|
|
niceCiMapper.updatePayUrlOfDataInput(data);
|
|
|
|
niceCiMapper.updatePayUrlOfDataInput(data);
|
|
|
@ -150,7 +148,7 @@ public class NiceCiAcceptService {
|
|
|
|
.billerNoticeKey(billUid)
|
|
|
|
.billerNoticeKey(billUid)
|
|
|
|
// FIXME: 저장형태 확인 필요
|
|
|
|
// FIXME: 저장형태 확인 필요
|
|
|
|
.customUrl(gson.toJson(kkoPayUrlRespData.getCustomUrl()))
|
|
|
|
.customUrl(gson.toJson(kkoPayUrlRespData.getCustomUrl()))
|
|
|
|
.expireAt(expireAt) //d.getExpiresDt()
|
|
|
|
.expireAt(kkoPayUrlRespData.getExpireAt()) //d.getExpiresDt()
|
|
|
|
.billUid(billUid)
|
|
|
|
.billUid(billUid)
|
|
|
|
.build()
|
|
|
|
.build()
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -186,11 +184,13 @@ public class NiceCiAcceptService {
|
|
|
|
* "mseeage": "정상응답"
|
|
|
|
* "mseeage": "정상응답"
|
|
|
|
* "data": {"url":"https://billgates-web.kakao.com/r/platform/pages/paynow/search/1832/11/1a481760-b0da-4a77-9a7a-74951db5fa01"}
|
|
|
|
* "data": {"url":"https://billgates-web.kakao.com/r/platform/pages/paynow/search/1832/11/1a481760-b0da-4a77-9a7a-74951db5fa01"}
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* @param data
|
|
|
|
* @param dataXit NiceCiDTO.InputDataXit
|
|
|
|
* @param orgMng
|
|
|
|
* @param billHistDTO NiceCiDTO.BillHistDTO
|
|
|
|
* @return
|
|
|
|
* @param orgMng OrgMng
|
|
|
|
|
|
|
|
* @param kkoPayUrlRespData KkoPayUrlRespData
|
|
|
|
|
|
|
|
* @return KkoPayUrlRespData
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private BillKkoApiRespDTO<?> getPayUrl(final NiceCiDTO.InputXit xitData, final NiceCiDTO.InputDataXit dataXit, NiceCiDTO.BillHistDTO billHistDTO, final OrgMng orgMng, final KkoPayUrlRespData kkoPayUrlRespData){
|
|
|
|
private BillKkoApiRespDTO<?> getPayUrl(final NiceCiDTO.InputDataXit dataXit, NiceCiDTO.BillHistDTO billHistDTO, final OrgMng orgMng, final KkoPayUrlRespData kkoPayUrlRespData){
|
|
|
|
// FIXME: 파라메터 확인 필요
|
|
|
|
// FIXME: 파라메터 확인 필요
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
map.put("biller_user_key", dataXit.getDataId());
|
|
|
|
map.put("biller_user_key", dataXit.getDataId());
|
|
|
|