(20250102) Testing receipt-add with structured metadata.

This commit is contained in:
2025-01-02 10:51:55 +00:00
parent 7f98f1f662
commit fd2a1ef6d1
5 changed files with 71 additions and 23 deletions
@@ -172,6 +172,12 @@ async def request_payment(
message = f"No such token key."
)
# Get the user's info:
user_info = CoreUserInfoModel(**kwargs["session_info"])
# Add required details to the payment's metadata:
inbound_data.metadata.idUser = user_info.userId
# ┳┓ ┏┓
# ┣┫┏┓┏┓┓┏┏┓┏╋ ┃┃┏┓┓┏┏┳┓┏┓┏┓╋
# ┛┗┗ ┗┫┗┻┗ ┛┗ ┣┛┗┻┗┫┛┗┗┗ ┛┗┗
@@ -183,7 +189,7 @@ async def request_payment(
sql_conn = current_app.sql_writer,
mongo_data_conn = current_app.data_mongo,
auth_token = auth_token,
user_info = CoreUserInfoModel(**kwargs["session_info"]),
user_info = user_info,
payment_request = inbound_data
)