(20241217) Payment callback ready for Safaricom M-Pesa Express.
This commit is contained in:
+31
-10
@@ -73,37 +73,43 @@ from controllers.api.mail import MailController
|
||||
from controllers.api.sms import SMSController
|
||||
from controllers.api.payment import PaymentController
|
||||
|
||||
# # Old Behaviour Models:
|
||||
# from controllers.mail.oauth_v3 import MailOAuthModel
|
||||
# from controllers.mail.sync_v3 import MailSyncModel
|
||||
# from controllers.mail.retrieve import MailRetrieveModel
|
||||
# from controllers.sms.auth_v2 import SMSAuthModel
|
||||
# from controllers.sms.send import SMSSendModel
|
||||
|
||||
# To make REST API calls:
|
||||
import httpx
|
||||
|
||||
# For debugging:
|
||||
from icecream import IceCreamDebugger
|
||||
|
||||
# All the blueprints:
|
||||
# Mail Blueprints:
|
||||
from api.blueprints.mail.oauth.request import mail_oauth_request_bp
|
||||
from api.blueprints.mail.oauth.callback import mail_oauth_callback_bp
|
||||
from api.blueprints.mail.sync.sync_v2 import mail_sync_bp
|
||||
from api.blueprints.mail.retrieve.list import mail_list_bp
|
||||
from api.blueprints.mail.retrieve.get import mail_get_bp
|
||||
from api.blueprints.mail.tags.update import mail_tags_update_bp
|
||||
|
||||
# SMS Blueprints:
|
||||
from api.blueprints.sms.auth import sms_auth_bp
|
||||
from api.blueprints.sms.send import sms_send_bp
|
||||
|
||||
# Chat Blueprints:
|
||||
# from api.blueprints.chat.auth import chat_auth_bp
|
||||
# from api.blueprints.chat.webhook import chat_webhook_bp
|
||||
|
||||
# Software Blueprints:
|
||||
from api.blueprints.software.auth import sw_auth_bp
|
||||
|
||||
# Payment Blueprints:
|
||||
from api.blueprints.finstitutions.payments.auth import pg_auth_bp
|
||||
from api.blueprints.finstitutions.payments.request import pg_request_bp
|
||||
from api.blueprints.finstitutions.payments.callback import pg_callback_bp
|
||||
from api.blueprints.finstitutions.payments.list import pg_list_bp
|
||||
|
||||
# AI Blueprints:
|
||||
from api.blueprints.ai.llm.invoke import llm_invoke_bp
|
||||
|
||||
# Tech and Testing Blueprints:
|
||||
from api.blueprints.tech.chat_alerts import tech_chat_alert_bp
|
||||
from api.blueprints.test.callback import test_callback_bp
|
||||
from api.blueprints.ai.llm.invoke import llm_invoke_bp
|
||||
|
||||
# All the helpers:
|
||||
from api.helpers.user import session
|
||||
@@ -131,23 +137,38 @@ APP_VERSION = constants.APP_VERSION
|
||||
# The Quart app:
|
||||
app = Quart(__name__, template_folder = r"../views")
|
||||
app = cors(app)
|
||||
|
||||
# Mail Blueprints:
|
||||
app.register_blueprint(mail_oauth_request_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_oauth_callback_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_sync_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_list_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_get_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
app.register_blueprint(mail_tags_update_bp, url_prefix = f"/{MODULE_BASE}/mail")
|
||||
|
||||
# SMS Blueprints:
|
||||
app.register_blueprint(sms_auth_bp, url_prefix = f"/{MODULE_BASE}/sms")
|
||||
app.register_blueprint(sms_send_bp, url_prefix = f"/{MODULE_BASE}/sms")
|
||||
|
||||
# Chat Blueprints:
|
||||
# app.register_blueprint(chat_auth_bp, url_prefix = f"/{MODULE_BASE}/chat")
|
||||
# app.register_blueprint(chat_webhook_bp, url_prefix = f"/{MODULE_BASE}/chat")
|
||||
|
||||
# Software Blueprints:
|
||||
app.register_blueprint(sw_auth_bp, url_prefix = f"/{MODULE_BASE}/software")
|
||||
|
||||
# Payment Blueprints:
|
||||
app.register_blueprint(pg_auth_bp, url_prefix = f"/{MODULE_BASE}/finstitutions/payments")
|
||||
app.register_blueprint(pg_request_bp, url_prefix = f"/{MODULE_BASE}/finstitutions/payments")
|
||||
app.register_blueprint(pg_callback_bp, url_prefix = f"/{MODULE_BASE}/finstitutions/payments")
|
||||
app.register_blueprint(pg_list_bp, url_prefix = f"/{MODULE_BASE}/finstitutions/payments")
|
||||
|
||||
# AI Blueprints:
|
||||
app.register_blueprint(llm_invoke_bp, url_prefix = f"/{MODULE_BASE}/ai")
|
||||
|
||||
# Tech and Testing Blueprints:
|
||||
app.register_blueprint(tech_chat_alert_bp, url_prefix = f"/{MODULE_BASE}/tech/alert")
|
||||
app.register_blueprint(test_callback_bp, url_prefix = f"/{MODULE_BASE}/test")
|
||||
app.register_blueprint(llm_invoke_bp, url_prefix = f"/{MODULE_BASE}/ai")
|
||||
|
||||
|
||||
# *****************************************************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user