some improvements on endpoints

This commit was merged in pull request #16.
This commit is contained in:
2025-04-17 17:41:09 +01:00
parent 1abc259a67
commit 4e9ff06ced
2 changed files with 11 additions and 13 deletions
+6 -5
View File
@@ -1,6 +1,7 @@
from flask import Blueprint, request, jsonify, current_app
import requests
from app.config import settings
from app.helpers.response_helper import ResponseHelper
from app.utils.auth import get_headers
from app.utils.logger import logger
from app.integrations.simbrella import SimbrellaClient
@@ -14,7 +15,7 @@ def verify_transaction():
response = SimbrellaClient.verify_transaction()
return jsonify(response), 200
return response
@autocall_bp.route("/refresh-disbursement", methods=["GET"])
def disbursement():
@@ -23,7 +24,7 @@ def disbursement():
response = SimbrellaClient.verify_transaction()
return jsonify(response), 200
return response
@autocall_bp.route("/payment-callback", methods=["POST"])
@@ -33,13 +34,13 @@ def payment_callback():
response = SimbrellaClient.payment_callback(data)
return jsonify(response), 200
return response
@autocall_bp.route("/penal-charge", methods=["POST"])
def penal_charge():
data = request.get_json()
logger.info(f"Calling Penal Charge Endpoints")
response = SimbrellaClient.penal_charge(data)
response = SimbrellaClient.penal_charge(data[0])
return jsonify(response), 200
return response