This commit is contained in:
VivianDee
2025-04-10 17:03:24 +01:00
7 changed files with 66 additions and 22 deletions
+1 -2
View File
@@ -22,7 +22,6 @@ class RepaymentService(BaseService):
"""
try:
validated_data = RepaymentService.validate_data(data, RepaymentSchema())
account_id = validated_data.get('accountId')
customer_id = validated_data.get('customerId')
customer = RepaymentService.get_or_create_customer(validated_data)
account = customer.accounts[0]
@@ -30,7 +29,7 @@ class RepaymentService(BaseService):
request_id = validated_data.get('requestId')
if (RepaymentService.validate_account_ownership(account_id = account_id, customer_id = customer_id)):
if (RepaymentService.validate_account_ownership(account_id = account.id, customer_id = customer_id)):
transaction = RepaymentService.log_transaction(validated_data = validated_data)
if not transaction: