From a5ea55d72575f8b5daf06cf1e18be41e2ca1c2f7 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Sun, 20 Oct 2024 01:39:32 +0500 Subject: [PATCH] Update Readme with exmaple reponse --- README.md | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 55cd6dd..503989a 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ - - Here are example curl commands to test different scenarios: 1. With both benefName and accountNo: -``` +```bash curl -X POST http://localhost:5000/verify-payment \ -H "Content-Type: application/json" \ -d '{ @@ -17,7 +15,7 @@ curl -X POST http://localhost:5000/verify-payment \ In this request, it will first try to verify with benfName, if it fails, then it will try with accountNo. 2. With only benefName: -``` +```bash curl -X POST http://localhost:5000/verify-payment \ -H "Content-Type: application/json" \ -d '{ @@ -27,7 +25,7 @@ curl -X POST http://localhost:5000/verify-payment \ }' ``` 3. With only accountNo: -``` +```bash curl -X POST http://localhost:5000/verify-payment \ -H "Content-Type: application/json" \ -d '{ @@ -36,3 +34,28 @@ curl -X POST http://localhost:5000/verify-payment \ "time": "2024-10-16 16:08" }' ``` + + +Exmaple Succcess responses; +1. Both benefName and accountNo or only benefName provided +```json +{ + "message": "Payment verified using beneficiary name", + "success": true +} +``` +2. Both benefName and accountNo or only accountNo provided, but failed with benefName +```json +{ + "message": "Payment verified using account number", + "success": true +} +``` +Example Failed response: +1. +```json +{ + "message": "Transaction not found, contact support", + "success": false +} +```