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

회원이 선택한 물건에 대해 결제를 시도한다. #1

Open
ilgolf opened this issue Sep 18, 2024 · 1 comment
Open

회원이 선택한 물건에 대해 결제를 시도한다. #1

ilgolf opened this issue Sep 18, 2024 · 1 comment
Assignees
Labels

Comments

@ilgolf
Copy link
Owner

ilgolf commented Sep 18, 2024

요구사항

  1. 선점 되어 다른 사람이 살 수 없어야한다.
  2. 동일한 재고를 동시에 다른 사람이 선점할 수 없다.
  3. 성공 시 결과로 총합 금액과 결제 ID 를 반환한다.
  4. 실패는 500과 400으로 분리하고 외부 결제사를 끼진 않기 때문에 Read Timeout과 Connection Timeout을 생각할 필요는 없다.
  5. 결제 처리 실패 시 선점 되지 말아야한다.

EndPoint

  • api/v1/payments/confirm

Response Spec

1. paymentId
2. totalAmount
@ilgolf ilgolf added the feature label Sep 18, 2024
@ilgolf ilgolf self-assigned this Sep 18, 2024
@ilgolf
Copy link
Owner Author

ilgolf commented Sep 29, 2024

Flow

주문 정보 조회 -> 재고 선점 -> 주문 상태 변경 (결제 대기) -> commit

Rollback plan

주문 상태 주문 시도로 변경 -> 재고 선점 해제

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant