diff --git a/api/blueprints/finstitutions/payments/callback.py b/api/blueprints/finstitutions/payments/callback.py index 439e511..600956a 100644 --- a/api/blueprints/finstitutions/payments/callback.py +++ b/api/blueprints/finstitutions/payments/callback.py @@ -214,6 +214,7 @@ async def safaricom_m_pesa_express_callback( paymentStatus = relevant_code["status"], message = relevant_code["message"], initByPG = True, + ipAddr = inbound_headers["Remote-IP"], httpCode = None, headers = inbound_headers, payload = inbound_data diff --git a/models/core/payment.py b/models/core/payment.py index 4610e9c..21b07a4 100644 --- a/models/core/payment.py +++ b/models/core/payment.py @@ -168,6 +168,12 @@ class PaymentEvent(BaseModel): frozen = True ) + ipAddr: str | None = Field( + description = "if initiated by the payment gateway, what ip addr did this request come from", + frozen = True, + default = None + ) + httpCode: int | None = Field( description = "the http code generated by the event", frozen = True,