diff --git a/app/api/services/select_offer.py b/app/api/services/select_offer.py index d2fed69..11338b3 100644 --- a/app/api/services/select_offer.py +++ b/app/api/services/select_offer.py @@ -32,10 +32,14 @@ class SelectOfferService(BaseService): customer_id = validated_data.get("customerId") amount = validated_data.get("requestedAmount") product_id = validated_data.get("productId") - offer_id = validated_data.get("offerId") + transaction_offer_id = validated_data.get("offerId") transaction_id = validated_data.get("transactionId") request_id = validated_data.get("requestId") + offer_id = int(transaction_offer_id[5:]) # The last part is int + + #"offerId": "SAL30001129", + if SelectOfferService.validate_account_ownership( account_id=account_id, customer_id=customer_id ): @@ -82,7 +86,7 @@ class SelectOfferService(BaseService): offers = [ { - "offerId": offer.offer_id, + "offerId": transaction_offer_id, "productId": product_id, "amount": amount, "upfrontPayment": upfront_payment,