Given a user has a few items in her shopping basket When she submits the payment details Then she receives the payment confirmation
- User has a shopping basket with a few items
- Check if all items are in stock (external system).
- If not in stock, payment is aborted and user is informed which items are out of stock
- Payment is sent to the payment gateway (external system)
- Payment gateway returns a payment status:
- PaymentFailure with a error message (e.g. User failed credit check)
- PaymentSuccessful
- Payment gateway returns a payment status:
- If payment is successful, a confirmation email is sent
- Payment status is returned. It could be:
- OK. Everything went well.
- Fail. Message explaining what went wrong is returned.
- Don't worry about the content of the basket. It can be mocked.
- Don't worry about the User attributes.
- Don't worry about the delivery mechanism. The entry point of this exercise is an action.
- Mock external systems
- Mock email sender
- Model packages and classes according to IDD building blocks.
- Don't worry about acceptance tests for this exercise.