(20241217) payment reference will now be the same as the payment id.

This commit is contained in:
2024-12-17 15:57:13 +05:30
parent d24d9cc248
commit 2e0c0224d4
15 changed files with 93 additions and 69 deletions
+2 -4
View File
@@ -286,7 +286,7 @@ class MailController:
) -> CoreAuthTokenModel | None:
# Simply call the core model:
return await current_app.core_auth_token_controller.get_token(
return await current_app.core_auth_token_controller.get_token_from_key(
mongo_conn = mongo_conn,
token_key = token_key
)
@@ -298,7 +298,7 @@ class MailController:
) -> List[CoreAuthTokenModel] | None:
# Simply call the core model:
return await current_app.core_auth_token_controller.get_tokens(
return await current_app.core_auth_token_controller.get_tokens_from_keys(
mongo_conn = mongo_conn,
token_keys = token_keys
)
@@ -611,14 +611,12 @@ class MailController:
@staticmethod
async def get_one_mail(
mongo_conn: AsyncMongo,
token_id: ObjectId | str,
message_id: ObjectId | str
) -> CoreMessageModel | None:
# Simply call the core model:
return await current_app.core_message_controller.get_message(
mongo_conn = mongo_conn,
token_id = token_id,
message_id = message_id
)
+5 -5
View File
@@ -162,25 +162,25 @@ class PaymentController:
return success
@staticmethod
async def get_token(
async def get_token_from_key(
mongo_conn: AsyncMongo,
token_key: ObjectId | str = None,
) -> CoreAuthTokenModel | None:
# Simply call the core model:
return await current_app.core_auth_token_controller.get_token(
return await current_app.core_auth_token_controller.get_token_from_key(
mongo_conn = mongo_conn,
token_key = token_key
)
@staticmethod
async def get_tokens(
async def get_tokens_from_keys(
mongo_conn: AsyncMongo,
token_keys: ObjectId | str = None,
) -> List[CoreAuthTokenModel] | None:
# Simply call the core model:
return await current_app.core_auth_token_controller.get_tokens(
return await current_app.core_auth_token_controller.get_tokens_from_keys(
mongo_conn = mongo_conn,
token_keys = token_keys
)
@@ -223,7 +223,7 @@ class PaymentController:
substitute_text = ""
) if isinstance(payment_request.customerNo, str) else payment_request.customerNo,
type = "CustomerPayBillOnline",
reference = payment_request.reference,
reference = str(payment_id),
description = payment_request.description,
callback_url = callback_url,
payer_no = regex.replace(
+1 -1
View File
@@ -173,7 +173,7 @@ class SMSController:
) -> CoreAuthTokenModel | None:
# Simply call the core model:
return await current_app.core_auth_token_controller.get_token(
return await current_app.core_auth_token_controller.get_token_from_key(
mongo_conn = mongo_conn,
token_key = token_key
)