sudo apt install aws-sdk
sudo apt install serverless
npm install serverless-offline -g
https://www.serverless.com/framework/docs/providers/aws/guide/credentials/
export REDIS_HOST=127.0.0.1
export REDIS_PORT=6379
export PRIVATE_KEY=my_private_key
npm run invoke:offline
npm run test
npm run deploy
todo peticion debe tener el header x-private-key con el valor asignado anteriormente
GET token/{tokenId}
Response
{
"email": "[email protected]",
"card_number": 111111111111111,
"expiration_month": "6",
"expiration_year": "2023"
}
POST /token
todos los campos son requeridos
{
"email": "[email protected]",
"card_number": 111111111111111,
"cvv": 123,
"expiration_month": "6",
"expiration_year": "2023"
}