Skip to content

FS Example ​

Overview ​

Chức năng cho phép người dùng thanh toán học phí online trong LMS.

Functional Scope ​

  • Tạo payment request.
  • Chuyển người dùng sang payment gateway.
  • Nhận callback kết quả.
  • Cập nhật payment status.

User Roles ​

RolePermission
Student/ParentTạo giao dịch thanh toán
AccountantXem báo cáo giao dịch

Process Flow ​

  1. User chọn khoản học phí cần thanh toán.
  2. User nhấn Thanh toán.
  3. Hệ thống tạo payment request.
  4. User được chuyển sang payment gateway.
  5. Gateway trả callback.
  6. Hệ thống cập nhật payment status.

Screen Specifications ​

ScreenFieldBehavior
Payment DetailAmountRead-only
Payment DetailPay ButtonEnabled nếu status là Pending

Business Rules ​

IDRule
BR-001Chỉ cho phép thanh toán khi payment status là Pending.

Validation and Error Handling ​

CaseExpected Handling
Gateway timeoutGiữ status Pending và cho phép kiểm tra lại.

Data Mapping ​

SourceTargetNotes
Gateway transaction_idpayment.transaction_idUnique

Integration Requirements ​

APIPurpose
Payment callbackNhận kết quả thanh toán

Permission Behavior ​

  • Accountant chỉ xem báo cáo, không tạo giao dịch thay user.

Acceptance Criteria ​

  • Khi gateway trả success hợp lệ, payment status chuyển thành Paid.

Open Questions ​

  • Có cần retry callback không?