From 6759057875ba57464d9d96b60b06dc057a41123c Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Tue, 22 Oct 2024 01:36:16 +0500 Subject: [PATCH] docs update --- README.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 80078f5..0cde242 100644 --- a/README.md +++ b/README.md @@ -2,19 +2,17 @@ This api will allow you to fetch customers payment and your MIB account history, it will match with transaction time, account owner name and amount. \ -but slight issue is that, MIB to MIB transaction sometimes have MIBs made-up name for the account owner name, This is challenging, so work around that, I added option to send customers account number to fetch the made-up name and match with it. \ -(BML) Farava transations works perfectly with just the name! +but slight issue is that, MIB to MIB transaction sometimes have MIBs made-up name for the account owner name, This is challenging, so work around that, \ +I added option to send customers account number to fetch the made-up name and match with it. \ +(BML) Farava transations works perfectly with just the name! \ +It uses cookie from webssion to fetch everything, it also has a keepalive service so websession does not expire after 5mins. ## How to deploy/get started (with docker/podman) -1. Login to MIB web (https://faisanet.mib.com.mv/)[https://faisanet.mib.com.mv/] and get the cookie: +1. Login to MIB web [https://faisanet.mib.com.mv/](https://faisanet.mib.com.mv/) and get the cookie: ![get_cookie_env.png](get_cookie_env.png) -copy this and paste it in .env -``` -QL_0= -IBSID= -``` -2. Create `compose.yml` with the follwing contents: +2. copy .env.example to .env and fill `QL_0` and `IBSID` with contents from step 1. +3. Create `compose.yml` with the follwing contents: ```yaml services: keepalive: @@ -30,9 +28,7 @@ services: 3. Run `docker compose up -d` and that is all. -## Here are example curl commands to test different scenarios: - - +## Using the API with curl examples: 1. With both benefName and accountNo: ```bash curl -X POST http://localhost:5000/verify-payment \ @@ -68,7 +64,7 @@ curl -X POST http://localhost:5000/verify-payment \ ``` -Exmaple Succcess responses; +## Exmaple Succcess responses: 1. Both benefName and accountNo or only benefName provided ```json { @@ -83,8 +79,9 @@ Exmaple Succcess responses; "success": true } ``` -Example Failed response: -1. + +## Example Failed response: +1. If transaction is not found with the provided details. ```json { "message": "Transaction not found, contact support",