-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Added payment mvc (토스) #114
Conversation
koreanMike513
commented
Feb 16, 2025
- 토스의 결제 흐름에 따라 success url 과 fail url 을 추가하였습니다.
HCP Terraform Plan Output
|
// "https://api.tosspayments.com/v1/payments/confirm" 에 결제성공 로직 구현 | ||
} catch (Exception e) { | ||
LogUtil.exception("PaymentService.processPaymentSuccess", e); | ||
throw new RuntimeException(e); |
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.
넵 현재는 비동기를 적용하여 exception을 적용하도록 해두었습니다.
try { | ||
kafkaService.sendKafkaEvent(PAYMENT_PROCESS_EVENT, event); | ||
} catch(Exception e) { | ||
LogUtil.exception("PaymentService.sendKafkaEvent", e); |
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.
이것도 오래 생각을 해보았는데 여기서 예외를 던져버리면 모든 transaction이 rollback 이 되어버리기 때문에 로깅 처리만 하고 재시도 로직은 카프카 dead letter topic queue 에서 처리되게 하는 것이 맞다고 생각하여 이렇게 처리하였습니다.