포인트 결제 금액변조 방지 기능 수정
@c287701e1a3fc723bf5b243a3e5ae3e9cccf41a7
--- src/main/java/itn/let/mjo/pay/web/MjonPayController.java
+++ src/main/java/itn/let/mjo/pay/web/MjonPayController.java
... | ... | @@ -3807,6 +3807,20 @@ |
| 3807 | 3807 |
mjonPayVO.setFrstRegisterId(user.getId()); |
| 3808 | 3808 |
mjonPayVO.setUserId(user.getId()); |
| 3809 | 3809 |
|
| 3810 |
+ RefundVO refundVO = new RefundVO(); |
|
| 3811 |
+ refundVO.setMberId(user.getId()); |
|
| 3812 |
+ |
|
| 3813 |
+ RefundVO mberInfoVO = refundService.selectRefundMberInfo(refundVO); |
|
| 3814 |
+ if(Double.parseDouble(mberInfoVO.getMberPoint()) |
|
| 3815 |
+ < mjonPayVO.getPoint()) {
|
|
| 3816 |
+ |
|
| 3817 |
+ modelAndView.addObject("status", "moreThanUserPoint");
|
|
| 3818 |
+ modelAndView.addObject("msg", "현재 회원의 보유포인트보다 큰 포인트를 환불 할 수 없습니다.");
|
|
| 3819 |
+ |
|
| 3820 |
+ return modelAndView; |
|
| 3821 |
+ } |
|
| 3822 |
+ |
|
| 3823 |
+ |
|
| 3810 | 3824 |
if("1".equals(mjonPayVO.getType())){ //현금전환 시
|
| 3811 | 3825 |
mjonPayVO.setMemo("현금 "+mjonPayVO.getPoint()+" 전환"); //전환 내용
|
| 3812 | 3826 |
mjonPayVO.setCmpltYn("N"); //현금 전환 시 처리 전
|
--- src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
+++ src/main/webapp/WEB-INF/jsp/web/com/webCommonHeader.jsp
... | ... | @@ -597,6 +597,13 @@ |
| 597 | 597 |
contentType: false, |
| 598 | 598 |
processData: false, |
| 599 | 599 |
success: function (returnData, status) {
|
| 600 |
+ |
|
| 601 |
+ //보유 금액 변조 방지 |
|
| 602 |
+ if(returnData.status == 'moreThanUserPoint'){
|
|
| 603 |
+ alert(returnData.msg) |
|
| 604 |
+ return; |
|
| 605 |
+ } |
|
| 606 |
+ |
|
| 600 | 607 |
if(status == 'success'){
|
| 601 | 608 |
alert(successAlertWord); |
| 602 | 609 |
location.reload(); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?