Note: Microservices will only start when they have been called. This causes the first run of each API call to be much slower than subsequent calls.
Valid API Key: validkey
Valid card number: 1111222233334444
Invalid API key: invalidkey
Invalid card number: 0000000000000000
- Microservice architecture
- SSL between all gateway/microservices
- Swagger integration for testing/development
- Audit logging
- Request is sent to the gateway
- API key is checked for validity
- Card number is validated against internal rules (currently just length and that it contains only numbers)
- Payment details are stored with a
PENDING
status - Request is sent to the bank
- The response from the bank is used to update the payment status
- The ID of the new payment is returned
- Request is sent to the gateway
- API key is checked for validity
- Payment ID is passed to the payment microservice
- The payment details are retrieved from the database using the payment id
- The payment details are returned
- Add unit, integration and end-to-end tests
- Add more validation to submitted details
- Add more logging (error and additional auditing)
- API URLs should be configurable outside of the codebase