2024-10-20 01:41:57 +05:00
|
|
|
### Maldives Islamic Bank Payment Verification API
|
|
|
|
|
|
|
|
|
2024-10-20 01:33:33 +05:00
|
|
|
Here are example curl commands to test different scenarios:
|
2024-10-19 03:11:52 +05:00
|
|
|
|
2024-10-20 01:33:33 +05:00
|
|
|
|
|
|
|
1. With both benefName and accountNo:
|
2024-10-20 01:39:32 +05:00
|
|
|
```bash
|
2024-10-20 01:33:33 +05:00
|
|
|
curl -X POST http://localhost:5000/verify-payment \
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
-d '{
|
|
|
|
"benefName": "ABDLA.MAJUDHU AHMED",
|
|
|
|
"accountNo": "90103101178641000",
|
|
|
|
"absAmount": "100",
|
|
|
|
"time": "2024-10-16 16:08"
|
|
|
|
}'
|
|
|
|
```
|
|
|
|
In this request, it will first try to verify with benfName, if it fails, then it will try with accountNo.
|
|
|
|
|
|
|
|
2. With only benefName:
|
2024-10-20 01:39:32 +05:00
|
|
|
```bash
|
2024-10-20 01:33:33 +05:00
|
|
|
curl -X POST http://localhost:5000/verify-payment \
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
-d '{
|
|
|
|
"benefName": "ABDLA.MAJUDHU AHMED",
|
|
|
|
"absAmount": "100",
|
|
|
|
"time": "2024-10-16 16:08"
|
|
|
|
}'
|
|
|
|
```
|
|
|
|
3. With only accountNo:
|
2024-10-20 01:39:32 +05:00
|
|
|
```bash
|
2024-10-19 03:11:52 +05:00
|
|
|
curl -X POST http://localhost:5000/verify-payment \
|
|
|
|
-H "Content-Type: application/json" \
|
|
|
|
-d '{
|
2024-10-20 01:33:33 +05:00
|
|
|
"accountNo": "90103101178641000",
|
2024-10-19 03:11:52 +05:00
|
|
|
"absAmount": "100",
|
2024-10-20 01:33:33 +05:00
|
|
|
"time": "2024-10-16 16:08"
|
2024-10-19 03:11:52 +05:00
|
|
|
}'
|
|
|
|
```
|
2024-10-20 01:39:32 +05:00
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
```
|