In order to run this project you will need:
docker installed and workingdocker-compose installed and workingAn api_token parameter is needed on every request to validate that the request comes from an authorised partner. This api token can be configured by setting up an API_TOKEN environment variable when booting the php container. Default docker-compose configuration comes with 123456 configured as the api token
git clone [email protected]:rodrigodiez/awesome-api.git
docker-compose up
$ curl --data "api_token=123456" http://localhost/payment
{"message":"amount field is mandatory","data":null}
curl --data "api_token=123456&amount=10.10&table_number=42&restaurant_location=101&reference=foo&card_type=visa" http://localhost/payment
curl http://localhost/payment\?api_token\=123456
curl http://localhost/payment\?api_token\=123456\&restaurant_location=101
docker-compose exec web bin/phpspec run
Content type
Image
Digest
Size
188.1 MB
Last updated
almost 10 years ago
docker pull rodrigodiez/awesome-api