(20241228) Started making provisions for disabling payment gateway accounts when the gateway says that the credentials are invalid. Am stuck at one place, though.
This commit is contained in:
@@ -139,6 +139,7 @@ class AllPaymentsController(PaymentsController):
|
||||
|
||||
async def request_payment(
|
||||
self,
|
||||
sql_conn: AsyncMySQL,
|
||||
mongo_data_conn: AsyncMongo,
|
||||
auth_token: CoreAuthTokenModel,
|
||||
user_info: CoreUserInfoModel,
|
||||
@@ -147,6 +148,8 @@ class AllPaymentsController(PaymentsController):
|
||||
|
||||
"""
|
||||
To request payment from someone through a payment gateway.
|
||||
:param sql_conn: Only needed when a payment gateway says that the credentials are invalid and the account needs
|
||||
to be disabled.
|
||||
:param mongo_data_conn: The database connection to use to perform this activity.
|
||||
:param auth_token: The token that has to be used to fetch the data.
|
||||
:param user_info: The info. of your user, so that you can identify who requested the payment.
|
||||
@@ -158,17 +161,21 @@ class AllPaymentsController(PaymentsController):
|
||||
|
||||
async def handle_payment_callback(
|
||||
self,
|
||||
sql_conn: AsyncMySQL,
|
||||
mongo_data_conn: AsyncMongo,
|
||||
inbound_data: dict
|
||||
):
|
||||
inbound_data: dict,
|
||||
inbound_headers: dict
|
||||
) -> PaymentRequestOneResult:
|
||||
|
||||
"""
|
||||
Whenever the payment gateway sends an update about a requested payment, we use this method to update our records
|
||||
as per the specification of the third-party payment gateway.
|
||||
:param sql_conn: Only needed when a payment gateway says that the credentials are invalid and the account needs
|
||||
to be disabled.
|
||||
:param mongo_data_conn: The database connection to use to perform this activity.
|
||||
:param inbound_data: The data sent by the payment gateway in their update.
|
||||
|
||||
:return: ??
|
||||
:param inbound_headers: The headers sent by the payment gateway in their update.
|
||||
:return: A structured response about the process of updating the payment event.
|
||||
"""
|
||||
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user