-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[POM-84] feat: 주문 거절 시 결제 취소 #30
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Payment canceled = Payment.builder() | ||
.id(paymentId) | ||
.amount(payment.getAmount()) | ||
.provider(payment.getProvider()) | ||
.status(PaymentStatus.CANCELLED) | ||
.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
도메인 내부에서 작업하는게 좋아보이네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
public Payment create(Payment payment) { | ||
return paymentRepository.save(payment); | ||
} | ||
|
||
|
||
public Payment canceled(Long paymentId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메소드이름이 동사 과거형인게 조금 부자연스러워 보여요. 현재형으로 바꾸거나 목적어를 추가하는 건 어떠신가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public void successCancelPayment() { | ||
// given | ||
Payment saved = new Payment(1L, 1000, PaymentStatus.COMPLETE, PGType.TOSS); | ||
Payment canceled = new Payment(1L, 1000, PaymentStatus.CANCELLED, PGType.TOSS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
status의 cancelled 와 변수명 canceled을 통일하면 좋을 것 같아요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍣
📌 구현 설명
주문 거절 시 결제 취소
👩💻 요구 사항과 구현 내용
주문이 거절되는 경우 해당 결제 건의
status
를CANCELED
로 변경한다.