36 lines
1.0 KiB
Python
36 lines
1.0 KiB
Python
from flask import Blueprint, request, jsonify, current_app
|
|
import requests
|
|
from app.config import settings
|
|
from app.utils.auth import get_headers
|
|
from app.utils.logger import logger
|
|
from app.integrations.simbrella import SimbrellaClient
|
|
|
|
autocall_bp = Blueprint("autocall", __name__)
|
|
|
|
@autocall_bp.route("/refresh-verify-disbursement", methods=["GET"])
|
|
def verify_transaction():
|
|
# data = request.json()
|
|
logger.info(f"Calling VerifyTransaction Components")
|
|
|
|
response = SimbrellaClient.verify_transaction()
|
|
|
|
return jsonify(response), 200
|
|
|
|
@autocall_bp.route("/refresh-disbursement", methods=["GET"])
|
|
def disbursement():
|
|
# data = request.json()
|
|
logger.info(f"Calling Disbursement Components")
|
|
|
|
response = SimbrellaClient.verify_transaction()
|
|
|
|
return jsonify(response), 200
|
|
|
|
|
|
@autocall_bp.route("/payment-callback", methods=["POST"])
|
|
def payment_callback():
|
|
data = request.json()
|
|
logger.info(f"Calling Callback Components")
|
|
|
|
response = SimbrellaClient.payment_callback(data)
|
|
|
|
return jsonify(response), 200 |