569 B
569 B
sequenceDiagram
participant User
participant PaymentService
participant PaymentGateway
participant Database
User->>PaymentService: 결제 요청
PaymentService->>Database: 거래 시작
Database-->>PaymentService: 거래 ID
PaymentService->>PaymentGateway: 결제 진행
alt Success
PaymentGateway-->>PaymentService: 결제 성공
PaymentService->>Database: 거래 확정
else Failure
PaymentGateway-->>PaymentService: 결제 실패
PaymentService->>Database: 거래 롤백
end