(20241217) Capturing IP Addrs for payment events (callback) now.

This commit is contained in:
2024-12-17 14:07:46 +05:30
parent 8b39393ed3
commit d923697506
2 changed files with 7 additions and 0 deletions
@@ -214,6 +214,7 @@ async def safaricom_m_pesa_express_callback(
paymentStatus = relevant_code["status"], paymentStatus = relevant_code["status"],
message = relevant_code["message"], message = relevant_code["message"],
initByPG = True, initByPG = True,
ipAddr = inbound_headers["Remote-IP"],
httpCode = None, httpCode = None,
headers = inbound_headers, headers = inbound_headers,
payload = inbound_data payload = inbound_data
+6
View File
@@ -168,6 +168,12 @@ class PaymentEvent(BaseModel):
frozen = True 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( httpCode: int | None = Field(
description = "the http code generated by the event", description = "the http code generated by the event",
frozen = True, frozen = True,