Skip to content

Commit

Permalink
Feat: 결제 취소 포인트 회수 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
marinesnow34 committed Mar 3, 2024
1 parent 14b49a1 commit 5153763
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 5153763

Please sign in to comment.