Skip to content

Commit 07a149d

Browse files
authored
Merge pull request #157 from JA-yeong-eop-JA-moeu-JA/feat/#118-purchase
2 parents 8a14fbf + 9e99b17 commit 07a149d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/jajaja/domain/order/service/OrderCommandServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public OrderPrepareResponseDto prepareOrder(Long memberId, OrderPrepareRequestDt
8484
Coupon coupon = validateCoupon(request.appliedCouponId(), memberId, cartProducts);
8585
validatePointUsage(request.point(), member);
8686

87-
int totalAmount = 0;
87+
int totalAmount;
8888
if(request.orderType() == OrderType.PERSONAL) {
8989
totalAmount = cartProducts.stream()
9090
.mapToInt(cp ->
@@ -156,7 +156,7 @@ public OrderApproveResponseDto approveOrder(Long memberId, OrderApproveRequestDt
156156
.orElseThrow(() -> new BadRequestException(ErrorStatus.ORDER_NOT_FOUND));
157157

158158
// 결제 금액과 결제해야 할 금액이 동일한지 확인
159-
if (!request.paidAmount().equals(order.getPaidAmount())) {
159+
if (!request.paidAmount().equals(order.getTotalAmount())) {
160160
throw new GeneralException(ErrorStatus.PAYMENT_AMOUNT_MISMATCH);
161161
}
162162

0 commit comments

Comments
 (0)