Guest User

Untitled

a guest
Jan 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Send: HI
  2. receive HELLO (proceed)
  3. else show communication error
  4. Send: BANKACCOUNTNUMBER:#
  5. receive CONTINUE (proceed)
  6. receive STOLEN, destroy card
  7. receive BLOCKED, show card blocked error
  8. receive INVALID, show card error
  9. else show communication error
  10. Send: PIN:#,ATTEMPT:#
  11. receive CONTINUE (proceed)
  12. receive INVALID, try again
  13. receive BLOCKED, too many attempts, show blocked error
  14. else show communication error
  15. Send: GETBALANCE:
  16. receive BALANCE:#, show balance
  17. else show communication error
  18. Send: WITHDRAWREQUEST:#
  19. receive APPROVED (give user requested amount, send BYE)
  20. receive BALANCEERROR, show not enough money error
  21. receive OTHERERROR, show generic error message
  22. else show communication error
  23. Send: BYE:
  24. receive CYA, properly close socket
  25. else silent error, destroy socket
  26.  
  27. Voorbeeld:
  28. Machine Central Computer
  29. HI
  30. HELLO
  31. BANKACCOUNTNUMBER:111199444
  32. CONTINUE
  33. PIN:0000,ATTEMPT:0
  34. CONTINUE
  35. WITHDRAWREQUEST:900
  36. APPROVED
  37. BYE
  38. CYA
Add Comment
Please, Sign In to add comment