Skip to content
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

Merged
merged 19 commits into from
Feb 21, 2025

Conversation

koreanMike513
Copy link
Collaborator

  • 토스의 결제 흐름에 따라 success url 과 fail url 을 추가하였습니다.

@koreanMike513 koreanMike513 added the enhancement New feature or request label Feb 16, 2025
@koreanMike513 koreanMike513 self-assigned this Feb 16, 2025
Copy link

HCP Terraform Plan Output

```
Plan: 35 to add, 0 to change, 0 to destroy.
```
[HCP Terraform Plan](https://app.terraform.io/app/Joyeuse_Planete/workspaces/Joyeuse_Planete/runs/run-qpZgHduaSLVdiuZ3)

// "https://api.tosspayments.com/v1/payments/confirm" 에 결제성공 로직 구현
} catch (Exception e) {
LogUtil.exception("PaymentService.processPaymentSuccess", e);
throw new RuntimeException(e);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추후 더 명확한 예외로 처리하시면 됩니다

Copy link
Collaborator Author

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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로깅 이외 다른 처리는 없어도 되는걸까요?

Copy link
Collaborator Author

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 에서 처리되게 하는 것이 맞다고 생각하여 이렇게 처리하였습니다.

@koreanMike513 koreanMike513 added the partially_resolved (requires a another review) resolved the addressed issues requires a review label Feb 18, 2025
@koreanMike513 koreanMike513 merged commit 88f087f into feat/add-foods-mvc Feb 21, 2025
2 checks passed
@koreanMike513 koreanMike513 deleted the feat/add-payment-mvc branch February 21, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request partially_resolved (requires a another review) resolved the addressed issues requires a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants