간편결제 네이버, 카카오 페이 등 구분값 저장 추가
요금결제내역 현금영수증 의무발행대기 상태일때 세금계산서, 현금영수증, 간이영수증 신청기능 추가
This commit is contained in:
parent
7827f55803
commit
fd6b4a7d66
@ -256,8 +256,17 @@ public class MjonPayVO extends ComDefaultVO{
|
||||
private String mrctTrdNo; // 상점거래번호
|
||||
private String trdNo; // 모빌리언스 거래번호
|
||||
private String spayMethod; // 간편결제 구분값
|
||||
private String spayDiv; // 간편결제분류
|
||||
|
||||
|
||||
public String getSpayDiv() {
|
||||
return spayDiv;
|
||||
}
|
||||
|
||||
public void setSpayDiv(String spayDiv) {
|
||||
this.spayDiv = spayDiv;
|
||||
}
|
||||
|
||||
public String getAmtSpaySum() {
|
||||
return amtSpaySum;
|
||||
}
|
||||
|
||||
@ -1679,11 +1679,24 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
|
||||
mjonPayVO.setUserId(mjonPayVO.getUserId());
|
||||
mjonPayVO.setFrstRegisterId(mjonPayVO.getUserId());
|
||||
String s_paymethod = mjonPayVO.getPayMethod();
|
||||
String spaydiv = mjonPayVO.getSpayDiv();
|
||||
|
||||
if(s_paymethod.equals("CARD")){
|
||||
s_paymethod = "신용카드" ; // 신용카드(정상 결과코드:3001)
|
||||
}else if(s_paymethod.equals("SPAY")){
|
||||
s_paymethod = "간편결제" ; // 간편결제
|
||||
s_paymethod = "간편결제" ; // 간편결제
|
||||
if(spaydiv.equals("NAV")){
|
||||
s_paymethod = "간편결제(네이버페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("KKO")){
|
||||
s_paymethod = "간편결제(카카오페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("TOS")){
|
||||
s_paymethod = "간편결제(토스페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("PYC")){
|
||||
s_paymethod = "간편결제(페이코)" ;
|
||||
}
|
||||
}else if(s_paymethod.equals("BANK")){
|
||||
s_paymethod = "계좌이체" ; // 계좌이체(정상 결과코드:4000)
|
||||
}else if(s_paymethod.equals("CELLPHONE")){
|
||||
@ -1704,6 +1717,70 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
|
||||
return mjonPayVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mjonPayVO
|
||||
* @return
|
||||
* @throws Exception
|
||||
* point table 값 넣기
|
||||
*/
|
||||
private MjonPayVO setKgmPointVO(MjonPayVO mjonPayVO) throws Exception{
|
||||
|
||||
String s_paymethod = mjonPayVO.getPayMethod();
|
||||
String spaydiv = mjonPayVO.getSpayDiv();
|
||||
|
||||
if(s_paymethod.equals("CARD")){
|
||||
s_paymethod = "신용카드" ; // 신용카드(정상 결과코드:3001)
|
||||
}else if(s_paymethod.equals("SPAY")){
|
||||
s_paymethod = "간편결제" ; // 간편결제
|
||||
if(spaydiv.equals("NAV")){
|
||||
s_paymethod = "간편결제(네이버페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("KKO")){
|
||||
s_paymethod = "간편결제(카카오페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("TOS")){
|
||||
s_paymethod = "간편결제(토스페이)" ;
|
||||
}
|
||||
else if(spaydiv.equals("PYC")){
|
||||
s_paymethod = "간편결제(페이코)" ;
|
||||
}
|
||||
}else if(s_paymethod.equals("BANK")){
|
||||
s_paymethod = "계좌이체" ; // 계좌이체(정상 결과코드:4000)
|
||||
}else if(s_paymethod.equals("CELLPHONE")){
|
||||
s_paymethod = "휴대폰" ; // 휴대폰(정상 결과코드:A000)
|
||||
}else if(s_paymethod.equals("VBANK")){
|
||||
s_paymethod = "가상계좌" ; // 가상계좌(정상 결과코드:4100)
|
||||
}else if(s_paymethod.equals("SSG_BANK")){
|
||||
s_paymethod = "SSG은행계좌" ; // SSG은행계좌(정상 결과코드:0000)
|
||||
}else if(s_paymethod.equals("CMS_BANK")){
|
||||
s_paymethod = "계좌간편결제" ; // 계좌간편결제(정상 결과코드:0000)
|
||||
}else {
|
||||
s_paymethod = "";
|
||||
}
|
||||
|
||||
String s_amt = mjonPayVO.getAmt();
|
||||
// 부가세별도 충전금액
|
||||
s_amt = setCashVatNotIncluded(s_amt);
|
||||
|
||||
//포인트 테이블 변수설정
|
||||
JoinSettingVO sysJoinSetVO = mjonMsgDataService.selectJoinSettingInfo();
|
||||
//int point = Math.round( (Float.parseFloat(s_amt)*2/100) ) ;
|
||||
float p_i_re_point = 0;
|
||||
if (sysJoinSetVO != null) {
|
||||
p_i_re_point = sysJoinSetVO.getPointPer();
|
||||
}
|
||||
int point = Math.round((Float.parseFloat(s_amt)*p_i_re_point/100)) ;
|
||||
|
||||
mjonPayVO.setPoint(point);
|
||||
|
||||
String pointMemo = s_paymethod; //포인트 메모
|
||||
pointMemo = pointMemo + " " + point + " 충전" ;
|
||||
|
||||
mjonPayVO.setPointMemo(pointMemo);
|
||||
|
||||
return mjonPayVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mjonPayVO
|
||||
* @return
|
||||
@ -2086,7 +2163,7 @@ public class MjonPayServiceImpl extends EgovAbstractServiceImpl implements MjonP
|
||||
mjonPayVO = this.setKgmCashVO(mjonPayVO);
|
||||
|
||||
//point 값 넣기
|
||||
mjonPayVO = this.setPointVO(mjonPayVO);
|
||||
mjonPayVO = this.setKgmPointVO(mjonPayVO);
|
||||
|
||||
|
||||
//PG, PGTXT, CASH , 포인트 insert / 회원정보 캐시,포인트 update
|
||||
|
||||
@ -2823,9 +2823,15 @@ public class MjonPayController {
|
||||
System.out.println(mjonPayVO.getTid());
|
||||
|
||||
MjonPayVO resultPayVO = mjonPayService.selectPayVO(mjonPayVO);
|
||||
|
||||
// Step 1. 세금계산서, 현금영수증 발행
|
||||
TaxVO taxVO2 = new TaxVO();
|
||||
taxVO2.setMoid(mjonPayVO.getMoid());
|
||||
taxVO2.setRcptType("3");
|
||||
taxService.deleteReceiptInfo(taxVO2);
|
||||
|
||||
// Step 2. 간이영수증 발행
|
||||
TaxVO taxVO = new TaxVO();
|
||||
|
||||
//간이영수증은 해당 팝업 호출 시 바로 완료처리함
|
||||
taxVO.setMoid(mjonPayVO.getMoid());
|
||||
taxVO.setRcptType("0"); // 발행유형-[PG결제-현금영수증 유형과 동일] 1:소득공제, 2:지출증빙, 3:의무발행, 9:세금계산서, 0:간이영수증
|
||||
|
||||
@ -450,9 +450,11 @@ public class MjonPayV2Controller {
|
||||
String Cardname = request.getParameter("Cardname"); /* 결제 카드사명 */
|
||||
String chkValue = request.getParameter("chkValue"); /* 결과값 검증 hash데이터 */
|
||||
String spayMethod = request.getParameter("Paymethod"); /* 지불방법 (간편결제 시에만 응답) */
|
||||
String MSTR = request.getParameter("MSTR"); //[2000byte 이하] 가맹점 전달 콜백변수
|
||||
|
||||
System.out.println("#############################################################");
|
||||
System.out.println("KG MOBILIANS NotiUrl - CARD Tradeid : " + Tradeid);
|
||||
System.out.println("KG MOBILIANS NotiUrl - CARD MSTR : " + MSTR);
|
||||
System.out.println("KG MOBILIANS NotiUrl - CARD SpayMethod : " + spayMethod);
|
||||
|
||||
String cpChkValue = "";
|
||||
@ -594,6 +596,7 @@ public class MjonPayV2Controller {
|
||||
mjonPayVO.setAmt(Prdtprice); // 결제금액
|
||||
mjonPayVO.setPayMethod("SPAY"); // 결제방법
|
||||
mjonPayVO.setSpayMethod(spayMethod); // 간편결제 결제방법
|
||||
mjonPayVO.setSpayDiv(MSTR); // 간편결제분류
|
||||
|
||||
mjonPayVO.setPgCode("KGM"); //
|
||||
mjonPayVO.setGoodsName(Prdtnm); //
|
||||
@ -993,6 +996,9 @@ public class MjonPayV2Controller {
|
||||
mjonPayVO.setResultMsg(Resultmsg);
|
||||
mjonPayVO.setAmt(Prdtprice); // 결제금액
|
||||
mjonPayVO.setPayMethod("CELLPHONE"); // 결제방법
|
||||
mjonPayVO.setSpayMethod(""); // 간편결제 결제방법
|
||||
mjonPayVO.setSpayDiv(""); // 간편결제분류
|
||||
|
||||
mjonPayVO.setPgCode("KGM"); //
|
||||
mjonPayVO.setGoodsName(Prdtnm); //
|
||||
mjonPayVO.setPhone(""); // 모바일
|
||||
@ -1415,6 +1421,8 @@ public class MjonPayV2Controller {
|
||||
mjonPayVO.setResultMsg(Resultmsg);
|
||||
mjonPayVO.setAmt(Prdtprice); // 결제금액
|
||||
mjonPayVO.setPayMethod("BANK"); // 결제방법
|
||||
mjonPayVO.setSpayMethod(""); // 간편결제 결제방법
|
||||
mjonPayVO.setSpayDiv(""); // 간편결제분류
|
||||
mjonPayVO.setPgCode("KGM"); //
|
||||
mjonPayVO.setGoodsName(Prdtnm); //
|
||||
mjonPayVO.setPhone(""); // 모바일
|
||||
|
||||
@ -14,6 +14,8 @@ public interface TaxService {
|
||||
|
||||
void deleteReceipts(TaxVO taxVO) throws Exception ;
|
||||
|
||||
void deleteReceiptInfo(TaxVO taxVO) throws Exception ;
|
||||
|
||||
int updateTaxForRefundCancle(TaxVO taxVO) throws Exception;
|
||||
|
||||
void updateTaxReceiptFile(TaxVO taxVO) throws Exception;
|
||||
|
||||
@ -56,6 +56,11 @@ public class TaxServiceImpl extends EgovAbstractServiceImpl implements TaxServic
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteReceiptInfo(TaxVO taxVO) throws Exception {
|
||||
taxDAO.deleteReceipt(taxVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateTaxForRefundCancle(TaxVO taxVO) throws Exception {
|
||||
return taxDAO.updateTaxForRefundCancle(taxVO);
|
||||
|
||||
@ -268,7 +268,16 @@ public class TaxController {
|
||||
if("p".equals(taxVO.getDept()) && "9".equals(taxVO.getRcptType()) && "C".equals(taxVO.getTaxTrgt())) {
|
||||
taxVO.setRegNo(egovCryptoUtil.encrypt(taxVO.getRegNo()));
|
||||
}
|
||||
|
||||
// Step 1. 세금계산서, 현금영수증 발행
|
||||
TaxVO taxVO2 = new TaxVO();
|
||||
taxVO2.setMoid(taxVO.getMoid());
|
||||
taxVO2.setRcptType("3");
|
||||
taxService.deleteReceiptInfo(taxVO2);
|
||||
|
||||
// Step 2. 세금계산서, 현금영수증 발행
|
||||
taxService.insertCashBill(taxVO);
|
||||
|
||||
redirectAttributes.addFlashAttribute("message", "발행신청 완료하였습니다.");
|
||||
RedirectUrlMaker redirectUrlMaker = new RedirectUrlMaker("/web/member/pay/PayList.do");
|
||||
return redirectUrlMaker.getRedirectUrl();
|
||||
|
||||
@ -632,7 +632,7 @@
|
||||
BANK_CODE, BANK_NAME, RCPT_TYPE, RCPT_AUTH_CODE, RCPT_TID,
|
||||
CARRIER, MOBILE, VBANK_CODE, VBANK_NAME, VBANK_NUM,
|
||||
VBANK_EXP_DATE, CANCEL_RESULT_CODE, CANCEL_RESULT_MSG, CANCEL_AMT, CANCEL_DATE,
|
||||
CANCEL_TIME, CANCEL_NUM, CALC_BASE_M, AFTER_PAY_YN, SPAY_METHOD
|
||||
CANCEL_TIME, CANCEL_NUM, CALC_BASE_M, AFTER_PAY_YN, SPAY_METHOD, SPAY_DIV
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -644,7 +644,7 @@
|
||||
#bankCode#, #bankName#, #rcptType#, #rcptAuthCode#, #rcptTid#,
|
||||
#carrier#, #mobile#, #vbankCode#, #vbankName#, #vbankNum#,
|
||||
#vbankExpDate#, #cancelResultCode#, #cancelResultMsg#, #cancelAmt#, #cancelDate#,
|
||||
#cancelTime#, #cancelNum#, #calcBaseM#, #afterPayYn#, #spayMethod#
|
||||
#cancelTime#, #cancelNum#, #calcBaseM#, #afterPayYn#, #spayMethod#, #spayDiv#
|
||||
)
|
||||
|
||||
</insert>
|
||||
|
||||
@ -353,24 +353,29 @@ function pgOpenerPopup(){
|
||||
kgmPayBankRequest();
|
||||
} else {
|
||||
var cnDirect = "";
|
||||
var mstr = "";
|
||||
if ($currentTab == 3) {
|
||||
cnDirect = "NAV:00:N"; // 네이버페이
|
||||
mstr = "NAV";
|
||||
} else if ($currentTab==4) {
|
||||
cnDirect = "KKO:00:N"; // 카카오페이
|
||||
mstr = "KKO";
|
||||
} else if ($currentTab==5) {
|
||||
cnDirect = "TOS:00:N"; // 토스페이
|
||||
mstr = "TOS";
|
||||
} else if ($currentTab==6) {
|
||||
cnDirect = "PYC:00:N"; // 페이코
|
||||
mstr = "PYC";
|
||||
}
|
||||
|
||||
// KG 모빌리언스 => SPAY(간편결제)
|
||||
kgmPayCardRequest(cnDirect);
|
||||
kgmPayCardRequest(cnDirect, mstr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//KG 모빌리언스 => CARD
|
||||
function kgmPayCardRequest(cnDirect) {
|
||||
function kgmPayCardRequest(cnDirect, mstr) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/member/pay/kgmCardEncodeAjax.do",
|
||||
@ -394,7 +399,7 @@ function kgmPayCardRequest(cnDirect) {
|
||||
form.Failurl.value = data.Failurl;
|
||||
form.Userid.value = data.Userid;
|
||||
form.Username.value = data.Username;
|
||||
form.MSTR.value = data.MSTR;
|
||||
form.MSTR.value = mstr;
|
||||
form.Payeremail.value = data.Payeremail;
|
||||
form.Cryptyn.value = data.Cryptyn;
|
||||
form.Cryptstring.value = data.Cryptstring;
|
||||
|
||||
@ -557,6 +557,24 @@ function getMberGrdChk() {
|
||||
<c:if test="${result.rcptType eq '5'}">
|
||||
<p class="fwRg c_002c9a">관리자 현금영수증 발행대기</p>
|
||||
</c:if>
|
||||
|
||||
<!-- 의무발생일경우 -->
|
||||
<c:if test="${result.rcptType eq '3'}">
|
||||
<c:if test="${result.payMethod eq 'BANK' or result.payMethod eq 'VBANK'}">
|
||||
<c:if test="${result.btnChk eq 'Y'}">
|
||||
<button type="button" class="btnType btnType20" data-tooltip="cashReceipt_popup02" onclick="javascript:taxValue('${result.moid}');">세금계산서</button>
|
||||
<button type="button" class="btnType btnType20" data-tooltip="cashReceipt_popup01" onclick="javascript:cashValue('${result.moid}');">현금영수증</button>
|
||||
</c:if>
|
||||
|
||||
<button type="button" class="btnType btnType20" onclick="fnSimpRecip('<c:out value="${result.tid}"/>','<c:out value="${result.moid}"/>'); return false;">간이영수증</button>
|
||||
</c:if>
|
||||
|
||||
<!-- 휴대폰결제 -->
|
||||
<c:if test="${result.payMethod eq 'CELLPHONE'}">
|
||||
<!-- 22.12.09 휴대폰결제는 현금영수증 제외 -->
|
||||
<button type="button" class="btnType btnType20" onclick="fnSimpRecip('<c:out value="${result.tid}"/>','<c:out value="${result.moid}"/>'); return false;">간이영수증</button>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:if>
|
||||
<!-- 발행완료 -->
|
||||
<c:if test="${result.confirmYn eq 'Y'}">
|
||||
|
||||
@ -292,23 +292,28 @@ function pgOpenerPopup(){
|
||||
kgmPayBankRequest();
|
||||
} else {
|
||||
var cnDirect = "";
|
||||
var mstr = "";
|
||||
if ($currentTab == 4) {
|
||||
cnDirect = "NAV:00:N"; // 네이버페이
|
||||
mstr = "NAV";
|
||||
} else if ($currentTab==5) {
|
||||
cnDirect = "KKO:00:N"; // 카카오페이
|
||||
mstr = "KKO";
|
||||
} else if ($currentTab==6) {
|
||||
cnDirect = "TOS:00:N"; // 토스페이
|
||||
mstr = "TOS";
|
||||
} else if ($currentTab==7) {
|
||||
cnDirect = "PYC:00:N"; // 페이코
|
||||
mstr = "PYC";
|
||||
}
|
||||
|
||||
// KG 모빌리언스 => SPAY(간편결제)
|
||||
kgmPayCardRequest(cnDirect);
|
||||
kgmPayCardRequest(cnDirect, mstr);
|
||||
}
|
||||
}
|
||||
|
||||
//KG 모빌리언스 => CARD
|
||||
function kgmPayCardRequest(cnDirect) {
|
||||
function kgmPayCardRequest(cnDirect, mstr) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/web/member/pay/kgmCardEncodeAjax.do",
|
||||
@ -332,7 +337,7 @@ function kgmPayCardRequest(cnDirect) {
|
||||
form.Failurl.value = data.Failurl;
|
||||
form.Userid.value = data.Userid;
|
||||
form.Username.value = data.Username;
|
||||
form.MSTR.value = data.MSTR;
|
||||
form.MSTR.value = mstr;
|
||||
form.Payeremail.value = data.Payeremail;
|
||||
form.Cryptyn.value = data.Cryptyn;
|
||||
form.Cryptstring.value = data.Cryptstring;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user