{"info":{"_postman_id":"72f8fccb-9349-4658-a43c-aad97900bcc3","name":"DMoney_API_Test","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"12316264","collectionId":"72f8fccb-9349-4658-a43c-aad97900bcc3","publishedId":"2s8ZDeUKKL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2023-01-27T16:14:14.000Z"},"item":[{"name":"Login","item":[{"name":"User login with invalid user","event":[{"listen":"test","script":{"id":"956defb8-5032-472f-a3b5-867cbe425123","exec":["pm.test(\"If user inputs wrong email, will see validation error\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User not found\");\r","});\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});"],"type":"text/javascript"}}],"id":"e5a61f0d-d685-4f96-8d60-8f30c0c09803","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"hey@gmail.com\",\r\n    \"password\":\"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/login","urlObject":{"path":["user","login"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5a61f0d-d685-4f96-8d60-8f30c0c09803"},{"name":"User login with invalid creds","event":[{"listen":"test","script":{"id":"43249f8a-97af-46a8-8975-58aebf8a5b49","exec":["pm.test(\"User will see validation error if inputs wrong creds\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"incorrect\");\r","});\r","\r","pm.test(\"Status code is 401\", function () {\r","    pm.response.to.have.status(401);\r","});"],"type":"text/javascript"}}],"id":"b3c30bea-38bb-429a-85a8-248d20de8784","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"salman@roadtocareer.net\",\r\n    \"password\":\"1234454\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/login","urlObject":{"path":["user","login"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"b3c30bea-38bb-429a-85a8-248d20de8784"},{"name":"User login with valid creds","event":[{"listen":"test","script":{"id":"eb3f75d9-61f9-4f40-bf13-83c698bd79a3","exec":["var jsonData= pm.response.json();\r","pm.collectionVariables.set(\"token\",jsonData.token)\r","//pm.environment.set(\"token\",jsonData.token)\r","\r","pm.test(\"Check if user logged in successfully\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"Login successfully\")\r","});\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript"}}],"id":"a8010845-049a-4c57-a1cd-3067ecae41eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\":\"salman@roadtocareer.net\",\r\n    \"password\":\"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/login","urlObject":{"path":["user","login"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"a8010845-049a-4c57-a1cd-3067ecae41eb"}],"id":"0564573b-d32b-4212-b8fd-8983984ce267","_postman_id":"0564573b-d32b-4212-b8fd-8983984ce267","description":""},{"name":"Search User","item":[{"name":"User List","event":[{"listen":"test","script":{"id":"0ae8314e-8b2f-494e-aa62-4399d8ec273f","exec":["pm.test(\"Check User List\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User list\");\r","});\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});\r","pm.test(\"Check if user 1 exists\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.users[1].id).equals(2);\r","});\r","\r","\r",""],"type":"text/javascript"}}],"id":"4f4999b1-a9a0-444a-b6a8-2d7e37e61cca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"url":"http://dmoney.roadtocareer.net/user/list","urlObject":{"path":["user","list"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f4999b1-a9a0-444a-b6a8-2d7e37e61cca"},{"name":"Search User","id":"813df2ff-6d1d-4ca1-80ee-7f9064320176","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/user/search/id/1234","urlObject":{"path":["user","search","id","1234"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"813df2ff-6d1d-4ca1-80ee-7f9064320176"},{"name":"Search User By Valid Phone","event":[{"listen":"test","script":{"id":"a636d915-c23e-4d78-809a-9742129e5c4c","exec":["var jsonData= pm.response.json();","","pm.test(\"Check if user is found\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.message).contains(\"User found\")","});","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"7b417cd6-014a-401b-bce8-acb3fdaf55cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/user/search/phonenumber/01569371265","urlObject":{"path":["user","search","phonenumber","01569371265"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"7b417cd6-014a-401b-bce8-acb3fdaf55cb"},{"name":"Search User By Invalid Phone","event":[{"listen":"test","script":{"id":"8f047921-3468-4e8f-b542-5c7dec69d54c","exec":["var jsonData= pm.response.json();","","pm.test(\"Check if user is found\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.message).contains(\"User not found\")","});","","pm.test(\"Status code is 404\", function () {","    pm.response.to.have.status(404);","});",""],"type":"text/javascript"}}],"id":"87625519-7dfc-4b47-a664-9ecc8fcc8ec9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/user/search/phonenumber/invalid","urlObject":{"path":["user","search","phonenumber","invalid"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"87625519-7dfc-4b47-a664-9ecc8fcc8ec9"}],"id":"78284e4c-9ded-41f0-9ee7-c20ba8e5cec7","_postman_id":"78284e4c-9ded-41f0-9ee7-c20ba8e5cec7","description":""},{"name":"Create Users","item":[{"name":"Create user with existing user data","event":[{"listen":"test","script":{"id":"106db340-233f-4b3e-88d9-e56c8bd4a0dd","exec":["pm.test(\"User should not be created if enter existing user's email and phone\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User already exists\");\r","});\r","\r","pm.test(\"Status code is 208\", function () {\r","    pm.response.to.have.status(208);\r","});"],"type":"text/javascript"}}],"id":"5ecca521-6be4-458e-9bc8-31446ce61f70","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{}},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"B6 User 1\",\r\n    \"email\":\"b6user1@test.com\",\r\n    \"password\":\"1234\",\r\n    \"phone_number\":\"0154789870\",\r\n    \"nid\":\"123456789\",\r\n    \"role\":\"Customer\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/create","urlObject":{"path":["user","create"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"5ecca521-6be4-458e-9bc8-31446ce61f70"},{"name":"Create Customer 1 With Valid Data","event":[{"listen":"test","script":{"id":"bcbd88a0-7d78-49b2-81e2-506e117356c4","exec":["pm.test(\"Check if user created successfully\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User created successfully\");\r","});\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","var jsonData = pm.response.json();\r","var userId= jsonData.user.id;\r","\r","pm.collectionVariables.set(\"customer_1_id\",userId)\r","pm.collectionVariables.set(\"customer_1_name\",jsonData.user.name)\r","pm.collectionVariables.set(\"customer_1_email\",jsonData.user.email)\r","pm.collectionVariables.set(\"customer_1_phone\",jsonData.user.phone_number)\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"f574ae9f-5c93-40f2-ab0a-14c9761659af","exec":["var randomId=_.random(10000,99999)\r","pm.collectionVariables.set(\"id\",randomId)"],"type":"text/javascript"}}],"id":"6e7814e2-7158-4dbf-b3fb-474bcb2d9ced","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Carroll Greenholt\",\r\n    \"email\":\"Buster.Brekke@gmail.com\",\r\n    \"password\":\"1234\",\r\n    \"phone_number\":\"0154729428\",\r\n    \"nid\":\"294286789\",\r\n    \"role\":\"Customer\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/create","urlObject":{"path":["user","create"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"6e7814e2-7158-4dbf-b3fb-474bcb2d9ced"},{"name":"Create Customer 2 With Valid Data","event":[{"listen":"test","script":{"id":"bcbd88a0-7d78-49b2-81e2-506e117356c4","exec":["pm.test(\"Check if user created successfully\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User created\");\r","});\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","var jsonData = pm.response.json();\r","var userId= jsonData.user.id;\r","\r","pm.collectionVariables.set(\"customer_2_id\",userId)\r","pm.collectionVariables.set(\"customer_2_name\",jsonData.user.name)\r","pm.collectionVariables.set(\"customer_2_email\",jsonData.user.email)\r","pm.collectionVariables.set(\"customer_2_phone\",jsonData.user.phone_number)\r",""],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"f574ae9f-5c93-40f2-ab0a-14c9761659af","exec":["var randomId=_.random(10000,99999)\r","pm.collectionVariables.set(\"id\",randomId)"],"type":"text/javascript"}}],"id":"25ee2382-3aa3-4f14-9a24-2325e41c8327","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Oliver Kub\",\r\n    \"email\":\"Heloise.Doyle@gmail.com\",\r\n    \"password\":\"1234\",\r\n    \"phone_number\":\"01544729428\",\r\n    \"nid\":\"294286789\",\r\n    \"role\":\"Customer\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/create","urlObject":{"path":["user","create"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"25ee2382-3aa3-4f14-9a24-2325e41c8327"},{"name":"Create Agent With Valid Data","event":[{"listen":"test","script":{"id":"d2e91501-13c8-4021-8e21-e815c057eb08","exec":["pm.test(\"Check if agent created successfully\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User created\");\r","});\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","var jsonData= pm.response.json();\r","var id= jsonData.user.id;\r","var phoneNumber=jsonData.user.phone_number;\r","pm.collectionVariables.set(\"agentId\",id)\r","pm.collectionVariables.set(\"agentPhone\",phoneNumber)"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"e3629eca-329e-4a28-85e9-2e57ddce2a94","exec":["var randomId=_.random(10000,99999)\r","pm.collectionVariables.set(\"id\",randomId)\r",""],"type":"text/javascript"}}],"id":"02c4f7c5-b16d-4d43-b028-d26293f7b9fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Feeney_Agent\",\r\n    \"email\":\"agent_Lorenzo.Morissette11@yahoo.com\",\r\n    \"password\":\"1234\",\r\n    \"phone_number\":\"01547029428\",\r\n    \"nid\":\"294286789\",\r\n    \"role\":\"Agent\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/create","urlObject":{"path":["user","create"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"9495def3-2d39-4ffa-b32c-3646f9ccec34","name":"Create Agent","originalRequest":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"name\":\"Test Agent 1\",\r\n    \"email\":\"agent88900@test.com\",\r\n    \"password\":\"1234\",\r\n    \"phone_number\":\"{{phoneNumber}}\",\r\n    \"nid\":\"123456789\",\r\n    \"role\":\"Agent\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/user/create"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:31:52 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"10c-tR9Zk19RjTwESofG7uPX2TpP3S8\""},{"key":"Content-Length","value":"268"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User created successfully\",\n    \"user\": {\n        \"id\": 5010,\n        \"name\": \"Test Agent 1\",\n        \"email\": \"agent20202@test.com\",\n        \"password\": \"1234\",\n        \"phone_number\": \"01702614665\",\n        \"nid\": \"123456789\",\n        \"role\": \"Agent\",\n        \"createdAt\": \"2022-09-19T04:31:52.000Z\",\n        \"updatedAt\": \"2022-09-19T04:31:52.000Z\"\n    }\n}"}],"_postman_id":"02c4f7c5-b16d-4d43-b028-d26293f7b9fc"}],"id":"4c29b142-f51e-4d78-abb7-c0f9bb74d4f7","_postman_id":"4c29b142-f51e-4d78-abb7-c0f9bb74d4f7","description":""},{"name":"Deposit To Agent","item":[{"name":"Deposit to Agent with Invalid Agent Phone Number","event":[{"listen":"test","script":{"id":"84487781-fdc8-4a6d-98f4-4aec9ba11018","exec":["pm.test(\"Deposit to agent shouldn't be successful if enters invalid agent phone number\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).to.contains(\"Account does not exist\");\r","});\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});\r",""],"type":"text/javascript"}}],"id":"62a020d3-740a-4955-a4e9-4e09b9a21a44","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"SYSTEM\",\r\n    \"to_account\":\"0987439873985\",\r\n    \"amount\":1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit","urlObject":{"path":["transaction","deposit"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"501e7014-0930-4233-9abb-d50ac466b07b","name":"Deposit to Agent","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"SYSTEM\",\r\n    \"to_account\":\"{{agent_phone_number}}\",\r\n    \"amount\":10000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:00 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"4e-gR131PNXhrMlFiEH4TLek4QKFYo\""},{"key":"Content-Length","value":"78"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Deposit successful\",\n    \"trnxId\": \"TXN580576\",\n    \"currentBalance\": 9212000\n}"}],"_postman_id":"62a020d3-740a-4955-a4e9-4e09b9a21a44"},{"name":"Deposit to Agent With Valid Phone Number","event":[{"listen":"test","script":{"id":"cdb3fa7a-c362-4a8d-bfc7-07a2e44b898f","exec":["pm.test(\"Deposit to agent should be successful with all correct data\", function () {\r","    var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).to.contains(\"Deposit successful\");\r","});\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r",""],"type":"text/javascript"}}],"id":"d1c596f9-d522-442a-8269-d2d9cfb7f7ed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"SYSTEM\",\r\n    \"to_account\":\"0154729428\",\r\n    \"amount\":1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit","urlObject":{"path":["transaction","deposit"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"b1df111d-caa6-448e-b7c6-3a0984445da2","name":"Deposit to Agent","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"SYSTEM\",\r\n    \"to_account\":\"{{agent_phone_number}}\",\r\n    \"amount\":10000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:00 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"4e-gR131PNXhrMlFiEH4TLek4QKFYo\""},{"key":"Content-Length","value":"78"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Deposit successful\",\n    \"trnxId\": \"TXN580576\",\n    \"currentBalance\": 9212000\n}"}],"_postman_id":"d1c596f9-d522-442a-8269-d2d9cfb7f7ed"}],"id":"bb61b679-fc5c-47fa-89d9-391bf7d41bac","_postman_id":"bb61b679-fc5c-47fa-89d9-391bf7d41bac","description":""},{"name":"Deposit To Customer","item":[{"name":"Deposit to Customer From Customer Account","event":[{"listen":"test","script":{"id":"b220584a-fc15-4837-8dff-4b0506e51f58","exec":["pm.test(\"Customer should not be able to deposit to another customer\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Only Agent can deposit money\")\r","})\r","\r","pm.test(\"Status code is 208\", function () {\r","    pm.response.to.have.status(208);\r","});"],"type":"text/javascript"}}],"id":"ec350d33-bc6b-4498-a144-b6ea7de49d99","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154750938\",\r\n    \"to_account\":\"0154786628\",\r\n    \"amount\":200\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit","urlObject":{"path":["transaction","deposit"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"b854be86-79e4-4274-8921-932321d1836e","name":"Deposit to Customer","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"{{agent_phone_number}}\",\r\n    \"to_account\":\"{{customer_phone_number}}\",\r\n    \"amount\":1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:16 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"4b-e/3Qx7RQskiPIy3ErlJkaeabZR8\""},{"key":"Content-Length","value":"75"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Deposit successful\",\n    \"trnxId\": \"TXN542052\",\n    \"currentBalance\": 9000\n}"}],"_postman_id":"ec350d33-bc6b-4498-a144-b6ea7de49d99"},{"name":"Deposit to customer with all correct data","event":[{"listen":"test","script":{"id":"d02be19a-df5a-4f6f-969b-5e774b26ff1a","exec":["pm.test(\"Deposit should be successful\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Deposit successful\")\r","})\r","\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});"],"type":"text/javascript"}},{"listen":"prerequest","script":{"id":"e7b43088-2f49-42ef-9a6c-cbb4f8091403","exec":["var amount = 200;","pm.collectionVariables.set(\"depositedAmount\", amount);"],"type":"text/javascript"}}],"id":"b6ee1985-991e-499d-a061-705605d81e13","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154729428\",\r\n    \"to_account\":\"0154786628\",\r\n    \"amount\": 200\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit","urlObject":{"path":["transaction","deposit"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"818fa122-f302-47b3-be97-91bfc9e79f6b","name":"Deposit to Customer","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"{{agent_phone_number}}\",\r\n    \"to_account\":\"{{customer_phone_number}}\",\r\n    \"amount\":1000\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/deposit"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:16 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"4b-e/3Qx7RQskiPIy3ErlJkaeabZR8\""},{"key":"Content-Length","value":"75"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Deposit successful\",\n    \"trnxId\": \"TXN542052\",\n    \"currentBalance\": 9000\n}"}],"_postman_id":"b6ee1985-991e-499d-a061-705605d81e13"}],"id":"d81b0f07-d1f8-4cb9-aafc-a6afb8d482b6","_postman_id":"d81b0f07-d1f8-4cb9-aafc-a6afb8d482b6","description":""},{"name":"Check Customer Balance After Deposit","item":[{"name":"Check customer 1 balance after deposit with invalid phone number","event":[{"listen":"test","script":{"id":"066a9021-5574-485d-975f-c6b32066a507","exec":["pm.test(\"User should get user not found msg\", ()=> {\r","      var jsonData = pm.response.json();\r","    pm.expect(jsonData.message).contains(\"User not found\");\r","});\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});"],"type":"text/javascript"}}],"id":"a3104f23-72ea-4cf1-be48-25414bd7058e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/121","urlObject":{"path":["transaction","balance","121"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"82b25cfb-252d-4bb1-a175-08cbe955a4cf","name":"Check customer balance","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/{{customer_phone_number}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:21 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"29-HgNOfMiRMJMhV6I2kJCFZ36KxcA\""},{"key":"Content-Length","value":"41"},{"key":"Status","value":"200 OK"},{"key":"Keep-Alive","value":"timeout=5, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User balance\",\n    \"balance\": 1000\n}"}],"_postman_id":"a3104f23-72ea-4cf1-be48-25414bd7058e"},{"name":"Check customer 1 balance after deposit with valid data","event":[{"listen":"test","script":{"id":"066a9021-5574-485d-975f-c6b32066a507","exec":["pm.test(\"Customer 1 should have expected balance\", ()=> {\r","    const response = pm.response.json();\r","    const expectedBalance = pm.collectionVariables.get(\"depositedAmount\")\r","    pm.expect(response.balance).to.eql(expectedBalance);\r","})\r","\r","var json=pm.response.json()\r","pm.collectionVariables.set(\"Customer_1_Balance\",json.balance)\r","\r","pm.test(\"Status code is 200\", function () {\r","    pm.response.to.have.status(200);\r","});"],"type":"text/javascript"}}],"id":"33ce3d9d-9a2e-4c18-b65d-6e6a1e7f78e5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/0154786628","urlObject":{"path":["transaction","balance","0154786628"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"3d3f1b6a-c238-41cc-933d-a07ca8fe4710","name":"Check customer balance","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/{{customer_phone_number}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:21 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"29-HgNOfMiRMJMhV6I2kJCFZ36KxcA\""},{"key":"Content-Length","value":"41"},{"key":"Status","value":"200 OK"},{"key":"Keep-Alive","value":"timeout=5, max=99"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User balance\",\n    \"balance\": 1000\n}"}],"_postman_id":"33ce3d9d-9a2e-4c18-b65d-6e6a1e7f78e5"}],"id":"75933292-f189-4219-b7fd-756fb2bb784d","_postman_id":"75933292-f189-4219-b7fd-756fb2bb784d","description":""},{"name":"Withdraw Money","item":[{"name":"Withdraw money from invalid agent number","event":[{"listen":"test","script":{"id":"049f32ce-a4ba-4906-bf92-a51e91113090","exec":["pm.test(\"Customer withdrawl should be failed for wrong agent account\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Account does not exist\")\r","})\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});"],"type":"text/javascript"}}],"id":"6953fc5c-16b3-459b-8335-36f2108af3a3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"232\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw","urlObject":{"path":["transaction","withdraw"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"55855f60-c50e-4422-b807-8524ebdbe97c","name":"Money withdraw by customer","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"{{customer_phone_number}}\",\r\n    \"to_account\":\"{{agent_phone_number}}\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:31 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"54-6wO5BkeE0Fegby1Xe3E2R4MBJ38\""},{"key":"Content-Length","value":"84"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw successful\",\n    \"trnxId\": \"TXN694480\",\n    \"fee\": 10,\n    \"currentBalance\": 940\n}"}],"_postman_id":"6953fc5c-16b3-459b-8335-36f2108af3a3"},{"name":"Withdraw money from Another Customer","event":[{"listen":"test","script":{"id":"e1398c08-91df-4458-9a72-c7af62568b19","exec":["pm.test(\"Money withdraw can't be done from customer\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Customer can not withdraw money from another customer\")\r","})\r","pm.test(\"Status code is 208\", function () {\r","    pm.response.to.have.status(208);\r","});"],"type":"text/javascript"}}],"id":"df3f9bfb-2711-447c-8bbb-f2b7edc3ecc6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"0154750938\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw","urlObject":{"path":["transaction","withdraw"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"6c5db61c-b975-4e90-9249-22cb12b26c4d","name":"Money withdraw by customer","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"{{customer_phone_number}}\",\r\n    \"to_account\":\"{{agent_phone_number}}\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:31 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"54-6wO5BkeE0Fegby1Xe3E2R4MBJ38\""},{"key":"Content-Length","value":"84"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw successful\",\n    \"trnxId\": \"TXN694480\",\n    \"fee\": 10,\n    \"currentBalance\": 940\n}"}],"_postman_id":"df3f9bfb-2711-447c-8bbb-f2b7edc3ecc6"},{"name":"WIthdraw mony with correct data","event":[{"listen":"test","script":{"id":"8cddad7b-5d56-4c8f-97b1-768cd18d076f","exec":["pm.test(\"Withdrawal should be successful\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Withdraw successful\")\r","})\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","var json=pm.response.json()\r","pm.collectionVariables.set(\"fee_withdraw\",json.fee)"],"type":"text/javascript"}}],"id":"555ea55d-620d-41da-afb6-af5488fd8db3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"0154729428\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw","urlObject":{"path":["transaction","withdraw"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"830860e6-15bc-4031-a85b-ca6894ccea5f","name":"Money withdraw by customer","originalRequest":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"{{customer_phone_number}}\",\r\n    \"to_account\":\"{{agent_phone_number}}\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/withdraw"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:31 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"54-6wO5BkeE0Fegby1Xe3E2R4MBJ38\""},{"key":"Content-Length","value":"84"},{"key":"Status","value":"201 Created"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Withdraw successful\",\n    \"trnxId\": \"TXN694480\",\n    \"fee\": 10,\n    \"currentBalance\": 940\n}"}],"_postman_id":"555ea55d-620d-41da-afb6-af5488fd8db3"}],"id":"41b3a3c2-276f-4254-9b1e-4b648242c230","_postman_id":"41b3a3c2-276f-4254-9b1e-4b648242c230","description":""},{"name":"Send Money","item":[{"name":"Send Money To Invalid Customer Account","event":[{"listen":"test","script":{"id":"71eaa4f4-d435-4774-8eb0-10a797779dc0","exec":["pm.test(\"Send Money should not be successful for invalid customer account\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"From/To Account does not exist\")\r","})\r","\r","pm.test(\"Status code is 404\", function () {\r","    pm.response.to.have.status(404);\r","});"],"type":"text/javascript"}}],"id":"d6966dcb-4e9b-4611-b486-312f4015e631","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"123\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/sendmoney","urlObject":{"path":["transaction","sendmoney"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"d6966dcb-4e9b-4611-b486-312f4015e631"},{"name":"Send Money To Agent Account","event":[{"listen":"test","script":{"id":"472ac2c6-2bfa-4aef-aabf-90b3e68620a5","exec":["pm.test(\"Send money to an agent should not be successful\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"From/To account should not be an agent account\")\r","})\r","\r","pm.test(\"Status code is 208\", function () {\r","    pm.response.to.have.status(208);\r","});"],"type":"text/javascript"}}],"id":"bfff15b4-fc63-44a0-b6ae-f06586a51b13","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"0154729428\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/sendmoney","urlObject":{"path":["transaction","sendmoney"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"bfff15b4-fc63-44a0-b6ae-f06586a51b13"},{"name":"Send money from Customer_1 to Customer_2 sucessfully","event":[{"listen":"test","script":{"id":"4d697555-22d4-4cd5-814d-bea41c16b209","exec":["pm.test(\"Send Money should be successful for all valid data\",()=>{\r","    var jsonData= pm.response.json();\r","    var message= jsonData.message;\r","    pm.expect(message).contains(\"Send money successful\")\r","})\r","\r","pm.test(\"Status code is 201\", function () {\r","    pm.response.to.have.status(201);\r","});\r","var json =pm.response.json()\r","pm.collectionVariables.set(\"fee_sendmoney\",json.fee)"],"type":"text/javascript"}}],"id":"ed55dac6-cb23-4752-87e4-2db7a2e6d67e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"},{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"from_account\":\"0154786628\",\r\n    \"to_account\":\"0154750938\",\r\n    \"amount\":50\r\n}","options":{"raw":{"language":"json"}}},"url":"http://dmoney.roadtocareer.net/transaction/sendmoney","urlObject":{"path":["transaction","sendmoney"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[],"_postman_id":"ed55dac6-cb23-4752-87e4-2db7a2e6d67e"}],"id":"6bdb5ce4-3648-4383-a050-7b6528c9a864","_postman_id":"6bdb5ce4-3648-4383-a050-7b6528c9a864","description":""},{"name":"Check Customer Statement","item":[{"name":"Check customer statement with invalid customer phone number","event":[{"listen":"test","script":{"id":"93f95a1e-e988-46fb-ae26-51ca089155f7","exec":["pm.test(\"User should get user not found message\", () => {","    const response = pm.response.json();","    const msg = response.message;","    pm.expect(msg).contains(\"User not found\");","});","","pm.test(\"Status code is 404\", function () {","    pm.response.to.have.status(404);","});"],"type":"text/javascript"}}],"id":"f746ab2a-3272-47a9-b9e9-a64c7f4b350a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/statement/123","urlObject":{"path":["transaction","statement","123"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"035658c5-c8d9-4369-805a-094988f0458c","name":"Check agent balance","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/{{agent_phone_number}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:09 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"2a-1C2l8awSnTKTGG4LspKagTZBmlA\""},{"key":"Content-Length","value":"42"},{"key":"Status","value":"200 OK"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User balance\",\n    \"balance\": 10000\n}"}],"_postman_id":"f746ab2a-3272-47a9-b9e9-a64c7f4b350a"},{"name":"Check customer 1 statement with all valid data","event":[{"listen":"test","script":{"id":"eb20a6d1-3b67-4062-9077-56fed377d92d","exec":["pm.test(\"User should get transactions list and transactions list, count should not be empty or zero\", () => {","    const response = pm.response.json();","    const count = response.count;","    const balance = response.balance;","    pm.expect(count).to.not.eql(0);","});","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"5525d1c9-f440-48e1-8f96-a789b9564e05","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/statement/0154786628","urlObject":{"path":["transaction","statement","0154786628"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"5346e267-312d-491d-a80c-cb57d4e070d3","name":"Check agent balance","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/{{agent_phone_number}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:09 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"2a-1C2l8awSnTKTGG4LspKagTZBmlA\""},{"key":"Content-Length","value":"42"},{"key":"Status","value":"200 OK"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User balance\",\n    \"balance\": 10000\n}"}],"_postman_id":"5525d1c9-f440-48e1-8f96-a789b9564e05"},{"name":"Check statement with valid transanction id","event":[{"listen":"test","script":{"id":"eb20a6d1-3b67-4062-9077-56fed377d92d","exec":["pm.test(\"User should get transanction list\",()=>{","    var jsonData= pm.response.json();","    var message= jsonData.message;","    pm.expect(message).contains(\"Transaction list\");","});","","","pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"36458f9e-78bf-4c3b-9b0f-a8f2042043f1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"ROADTOSDET","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/search/TXN756988","urlObject":{"path":["transaction","search","TXN756988"],"host":["http://dmoney.roadtocareer.net"],"query":[],"variable":[]}},"response":[{"id":"27a814b2-5037-4acc-9bd5-6808b6c82e52","name":"Check agent balance","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ","type":"text"},{"key":"X-AUTH-SECRET-KEY","value":"{{secretKey}}","type":"text"}],"url":"http://dmoney.roadtocareer.net/transaction/balance/{{agent_phone_number}}"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 19 Sep 2022 04:32:09 GMT"},{"key":"Server","value":"Apache"},{"key":"X-Powered-By","value":"Express, Phusion Passenger(R) 6.0.14"},{"key":"ETag","value":"W/\"2a-1C2l8awSnTKTGG4LspKagTZBmlA\""},{"key":"Content-Length","value":"42"},{"key":"Status","value":"200 OK"},{"key":"Keep-Alive","value":"timeout=5, max=100"},{"key":"Connection","value":"Keep-Alive"},{"key":"Content-Type","value":"application/json; charset=utf-8"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User balance\",\n    \"balance\": 10000\n}"}],"_postman_id":"36458f9e-78bf-4c3b-9b0f-a8f2042043f1"}],"id":"27f7d173-2b12-4aa8-8802-95f72e8f7ee4","_postman_id":"27f7d173-2b12-4aa8-8802-95f72e8f7ee4","description":""}],"event":[{"listen":"prerequest","script":{"id":"4c31764b-1422-41f8-be1d-4d0900028a0b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"7bb236dc-a4ec-4304-9aa1-57581735faa3","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"http://dmoney.roadtocareer.net","type":"string"},{"key":"token","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InNhbG1hbkByb2FkdG9jYXJlZXIubmV0IiwicGFzc3dvcmQiOiIxMjM0IiwiaWF0IjoxNjc0ODI0MTgzLCJleHAiOjE2NzQ4MjU5ODN9.r5nWz8jRdq52g2DxFHP9L3qecVa9hd-jU_SoEDtpfQQ"},{"key":"partnerKey","value":"ROADTOSDET","type":"string"},{"key":"randomId","value":88900},{"key":"agentPhone","value":"0154729428"},{"key":"customer_1_id","value":3338},{"key":"customer_1_name","value":"Essie Tromp DDS"},{"key":"customer_1_email","value":"Berta_Baumbach87@hotmail.com"},{"key":"customer_1_phone","value":"0154786628"},{"key":"customer_2_id","value":3339},{"key":"customer_2_name","value":"Brad Quigley II"},{"key":"customer_2_email","value":"Orval.Weimann@hotmail.com"},{"key":"customer_2_phone","value":"0154750938"},{"key":"agentId","value":3340},{"key":"id","value":29428},{"key":"Customer_1_Balance","value":200},{"key":"depositedAmount","value":200},{"key":"fee_withdraw","value":5},{"key":"fee_sendmoney","value":5}]}