first commit

This commit is contained in:
CHIEFSOFT\ameye
2025-03-20 20:59:29 -04:00
commit e77edb9b45
107 changed files with 2257 additions and 0 deletions
+54
View File
@@ -0,0 +1,54 @@
from flask import request
from marshmallow import ValidationError
from app.utils.logger import logger
from app.helpers.response_helper import ResponseHelper
from app.schemas.notification_callback import NotificationCallbackSchema
class NotificationCallbackService:
@staticmethod
def process_request(data):
"""
Process the NotificationCallback request.
Args:
data (dict): The request data.
Returns:
dict: A standardized response.
"""
try:
logger.info("Processing NotificationCallback request")
# Validate input data using the NotificationCallback schema
schema = NotificationCallbackSchema()
validated_data = schema.load(data) # Raises ValidationError if invalid
# Simulated processing logic
response_data = {
"resultCode": "00",
"resultDescription": "Successful"
}
# return ResponseHelper.success(
# data=response_data,
# message="Notification callback processed successfully"
# )
return response_data
except ValidationError as err:
logger.error(f"Validation Error: {err.messages}")
return ResponseHelper.error(
message="Invalid input data",
status_code=400,
error=err.messages
)
except Exception as e:
logger.error(f"An error occurred: {str(e)}", exc_info=True)
return ResponseHelper.error(
message="An internal error occurred",
status_code=500,
error=str(e)
)