You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refer to the payments.json and transactions.json examples
docker compose up -d
curl "http://localhost:1080/transactions?transactionRef=XVJ3KF9"| jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 132 100 132 0 0 425 0 --:--:-- --:--:-- --:--:-- 425
{
"transactionId": "945c47d1-203f-49ca-896a-5279d8075785",
"transactionRef": "XVJ3KF9",
"amount": 65000,
"charges": 75
}
curl -X POST "http://localhost:1080/payments" -H 'Content-Type: application/json' -d '{"counterpartyIBAN": "CH8089144265645434356", "amount": 15000}'| jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 121 100 59 100 62 1401 1473 --:--:-- --:--:-- --:--:-- 2880
{
"status": "accepted",
"transactionRef": "XVJ3KF9"
}
build the mocks (proxy mode will record the expectations)
curl -H "X-Token:$(uuidgen)" http://localhost:8089/ | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73 100 73 0 0 160 0 --:--:-- --:--:-- --:--:-- 159
{
"source": "integration-service",
"processed": "2024-08-18T10:39:39.655213"
}
Extract & Load Mocks
extract and load the expectations
curl -v -X PUT "http://localhost:1080/mockserver/retrieve?type=RECORDED_EXPECTATIONS&format=JSON" -o ./mocks/recording.json
re-initate the same request (response will be by the mock, instead of integration service)
curl http://localhost:8089/ | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 73 100 73 0 0 229 0 --:--:-- --:--:-- --:--:-- 229
{
"source": "integration-service",
"processed": "2024-08-18T10:39:39.655213"
}
date
Sun Aug 18 13:45:41 +03 2024