(20241217) Capturing IP Addrs for payment events (callback) now.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user