done with transaction verify

This commit is contained in:
lennyaiko
2025-03-27 12:21:05 +01:00
parent 0d4643c8df
commit 2548664c2f
3 changed files with 57 additions and 0 deletions
+23
View File
@@ -202,3 +202,26 @@ def collect_loan():
}
return jsonify(response), 200
@loan_bp.route("/transaction-verify", methods=["POST"])
def transaction_verify():
data = request.json
api_url = f"{current_app.config['API_BASE_URL']}/TransactionVerify"
# response = requests.post(api_url, json=data, headers=get_headers())
# return jsonify(response.json()), response.status_code
response = {
"requestId": "R02802",
"countryCode": "NGR",
"transactionId": "Tr201712RK9232P115",
"transactionType": "Disbursement",
"customerId": "CN621868",
"accountId": "2017821799",
"providedAmount": 100,
"collectedAmount": 7.5,
"resultCode": "00",
"resultDescription": "Collect Status retrieved successfully.",
}
return jsonify(response), 200
View File
+34
View File
@@ -357,3 +357,37 @@ paths:
responses:
200:
description: A successful response
/loans/transaction-verify:
post:
summary: Verify a transaction
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
requestId:
type: string
example: "R02802"
countryCode:
type: string
example: "NGR"
counter:
type: string
example: "2"
transactionId:
type: string
example: "Tr201712RK9232P115"
customerId:
type: string
example: "CN621868"
accountId:
type: string
example: "2017821799"
transactionType:
type: string
example: "Disbursement"
responses:
200:
description: A successful response