결제 전환 목표 아키텍처 정의 (1/2) (SPRING-ARC-REVIEW-1783835414)
This commit is contained in:
parent
9bcc4d8373
commit
2fd38c0575
1 changed files with 18 additions and 29 deletions
|
|
@ -1,32 +1,21 @@
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant User
|
participant A as User
|
||||||
participant PaymentGateway
|
participant B as Payment Processor
|
||||||
participant PaymentService
|
participant C as External Gateway
|
||||||
participant Database
|
A->>B: 결제 요청
|
||||||
|
B->>C: 결제 정보 전달
|
||||||
User->>+PaymentService: Start Payment
|
alt 성공
|
||||||
PaymentService->>+PaymentGateway: Process Payment
|
C-->>B: 성공 응답
|
||||||
PaymentGateway-->>-PaymentService: Payment Success
|
B-->>A: 결제 완료
|
||||||
PaymentService->>Database: Record Payment
|
note right of A: 결제 성공 처리
|
||||||
Database-->>-PaymentService: Payment Recorded
|
else 외부 실패
|
||||||
PaymentService-->>-User: Payment Confirmed
|
C-->>B: 실패 응답
|
||||||
|
B-->>A: 결제 실패
|
||||||
%% External Failure
|
note right of A: 실패 처리 및 재시도
|
||||||
User->>+PaymentService: Start Payment
|
else DB 실패
|
||||||
PaymentService->>+PaymentGateway: Process Payment
|
B->>B: 롤백 처리
|
||||||
PaymentGateway-->>-PaymentService: Payment Failed
|
B-->>A: 결제 실패
|
||||||
PaymentService-->>-User: Payment Failed
|
note right of A: 롤백 기록
|
||||||
|
end
|
||||||
%% DB Failure
|
|
||||||
User->>+PaymentService: Start Payment
|
|
||||||
PaymentService->>+PaymentGateway: Process Payment
|
|
||||||
PaymentGateway-->>-PaymentService: Payment Success
|
|
||||||
PaymentService->>Database: Record Payment
|
|
||||||
Database-->>-PaymentService: DB Failure
|
|
||||||
PaymentService-->>-User: Payment Processing Error
|
|
||||||
|
|
||||||
%% Commit/Rollback
|
|
||||||
Note over PaymentService: Commit if successful
|
|
||||||
Note over PaymentService: Rollback if there's an error
|
|
||||||
```
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue