A simple Laravel app that handles payment processing using queues and Redis. It's built to be reliable and easy to monitor.
- Payment processing using Laravel queues
- Redis for handling the queue
- Jobs that retry automatically if they fail
- Proper error handling and logging
- A command to check if the queue is healthy "half done"
- An API endpoint to create orders
- Start everything up:
./vendor/bin/sail up -d- Run the migrations:
./vendor/bin/sail artisan migrate- Run the tests:
./vendor/bin/sail artisan test4 - Run horizon queue
./vendor/bin/sail artisan horizon- Check your jobs in Horizon:
http://localhost/horizon/
- Test the queue with this curl command to simulate the API call of create order:
curl -X POST http://localhost/api/create-order \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"user_id": 1,
"amount": 51231.00
}'- Add batching for failed jobs
- Set up alerts and notifications
- Add more monitoring features