diff --git a/src/main/java/com/readyvery/readyverydemo/src/order/OrderServiceImpl.java b/src/main/java/com/readyvery/readyverydemo/src/order/OrderServiceImpl.java index 7b37ae9..a85cea5 100644 --- a/src/main/java/com/readyvery/readyverydemo/src/order/OrderServiceImpl.java +++ b/src/main/java/com/readyvery/readyverydemo/src/order/OrderServiceImpl.java @@ -354,6 +354,7 @@ public CurrentRes getCurrent(String orderId) { } @Override + @Transactional public Object cancelTossPayment(CustomUserDetails userDetails, TossCancelReq tossCancelReq) { UserInfo user = getUserInfo(userDetails); Order order = getOrder(tossCancelReq.getOrderId()); @@ -419,6 +420,7 @@ private void applyCancelTosspaymentDto(Order order, TosspaymentDto tosspaymentDt order.setPayStatus(false); order.getReceipt().setCancels(tosspaymentDto.getCancels().toString()); order.getReceipt().setStatus(tosspaymentDto.getStatus()); + order.getUserInfo().setPoint(order.getUserInfo().getPoint() - order.getPoint()); if (order.getCoupon() != null) { order.getCoupon().setUsed(false); }