done with transaction verify
This commit is contained in:
@@ -202,3 +202,26 @@ def collect_loan():
|
|||||||
}
|
}
|
||||||
|
|
||||||
return jsonify(response), 200
|
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
|
||||||
|
|||||||
+34
@@ -357,3 +357,37 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: A successful response
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user