docs update

This commit is contained in:
Shihaam Abdul Rahman 2024-10-22 01:36:16 +05:00
parent b4190d3f38
commit 6759057875
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -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",