(20241217) Payment callback ready for Safaricom M-Pesa Express.

This commit is contained in:
2024-12-17 13:27:15 +05:30
parent b6ba54abd4
commit 9de9542fda
12 changed files with 632 additions and 52 deletions
+25 -1
View File
@@ -108,6 +108,30 @@ class PGPaymentRequestHeaders(BaseModel):
# ---------------------------------------------------------------------------------------------------------------------
class PaymentRequestMetadata(BaseModel):
idClient: str | int = Field(
description = "account master id for the user's customer",
frozen = True
)
inAccount: str | int = Field(
description = "account master id for the user's bank account",
frozen = True
)
# ┏┓ ┏•
# ┃ ┏┓┏┓╋┓┏┓
# ┗┛┗┛┛┗┛┗┗┫
# ┛
class Config:
extra = "allow"
# ---------------------------------------------------------------------------------------------------------------------
class PGPaymentRequestData(BaseModel):
tokenKey: ObjectId = Field(
@@ -163,7 +187,7 @@ class PGPaymentRequestData(BaseModel):
frozen = True
)
metadata: dict = Field(
metadata: PaymentRequestMetadata = Field(
description = "any extra information about this payment",
frozen = True
)