Guest User

Untitled

a guest
Oct 28th, 2025
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | Software | 0 0
  1. Use case: ProcessPaymentRequest
  2. ID: UC-PPR
  3. Brief description:
  4. Customer attempts a payment on their Z-Flexi Card. Z-Server then invokes Z-Client to obtain the Customer’s selected payment method for a pending authorisation. The Customer chooses either to pay by card or by reward points. Z-Client relays this choice to Z-Server, which authorises the transaction, applies rounding rules, and updates both the credit and reward-points registers. If reward points are insufficient, Z-Server automatically splits the payment between reward points and card. Confirmation is sent by email via Z-Server.
  5. Primary actors:
  6. Z-Server
  7. Secondary actors:
  8. Customer
  9. Preconditions:
  10. 1. Z-Client and Z-Server are operational and can communicate.
  11. 2. Customer is authenticated in Z-Client and securely prompted by Z-Server.
  12. 3. Z-Server holds a pending transaction (merchant, amount, currency).
  13. 4. Z-Client holds the latest local balances (available credit, reward points).
  14. 5. This use case may be invoked directly or included from MakeReservation.
  15. Main flow:
  16. 1. The use case starts when a payment is attempted on the Z-Flexi Card.
  17. 2. Z-Server invokes Z-Client with the pending transaction details and triggers a dialog to establish payment method.
  18. 3. Z-Client displays the merchant and amount and prompts the Customer to select a payment method.
  19. 4. The Customer selects either Pay by Card or Pay by Reward Points.
  20. 5. Z-Client relays the selected method to Z-Server.
  21. 6. Z-Server performs authorisation and applies the correct rules:
  22.  6.1. If the method is Card, Z-Server increases the card balance by the transaction amount and increases reward points by the whole-pound value of the amount (rounding down).
  23.  6.2. If the method is Reward Points, Z-Server deducts the rounded-up number of points required for the amount.
  24.  6.3. If reward points are insufficient, Z-Server redeems all available points and charges the remaining balance to card, awarding points only on the card-charged portion.
  25. 6.4. If the chargeable amount changes, re-prompt the Customer to confirm. On confirm continue, on cancel go to A2.
  26. 7. Z-Server returns the result and new balances.
  27. 8. Z-Client updates its local balances, displays the confirmation message, and Z-Server sends a confirmation email.
  28. 9. Z-Client clears the session data and returns to the previous screen.
  29.  
  30. Postconditions:
  31. 1. The transaction attempt has been fully processed and its outcome recorded by Z-Server.
  32. 2. Z-Server and Z-Client hold consistent, synchronised reward-points and credit-balance registers.
  33. 3. A confirmation or cancellation message has been displayed to the Customer.
  34. 4. Z-Server has issued an email notification describing the outcome (approved, split, or declined).
  35. 5. Temporary PPR state is cleared and Z-Client returns to the previous screen.
  36.  
  37. Alternative flows:
  38. ProcessPaymentRequest:A1 – Insufficient Credit
  39. 1. Triggered after step 6.1 when the Customer chooses Pay by Card and available credit is below the transaction amount.
  40. 2. Z-Server reports “insufficient credit.”
  41. 3. Z-Client informs the Customer and allows selection of Reward Points (return to step 3) or cancellation.
  42. 4. Z-Server logs the outcome.
  43. Postconditions: The system state satisfies all postconditions listed above.
  44. ProcessPaymentRequest:A2 – Customer Cancels at Prompt
  45. 1. Triggered at step 2 or 3 when the Customer cancels the dialog.
  46. 2. Z-Client reports cancellation to Z-Server.
  47. 3. Z-Server records a declined transaction.
  48. Postconditions: The system state satisfies all postconditions listed above.
  49. ProcessPaymentRequest:A3 – Amount Adjusted Before Confirm
  50. 1. Triggered during step 5 when Z-Server returns a revised amount (e.g. tip or price change).
  51. 2. Z-Client re-prompts the Customer and then continues from step 3.
  52. Postconditions: The system state satisfies all postconditions listed above.
  53.  
  54. Notes on relationships:
  55. • MakeReservation «include» ProcessPaymentRequest
  56.  
Advertisement
Add Comment
Please, Sign In to add comment