fix(pally): align webhook handler with official API spec

This commit is contained in:
2026-05-31 14:25:05 +07:00
parent 763e041a8b
commit b5976d0b21
2 changed files with 25 additions and 29 deletions

View File

@@ -22,16 +22,12 @@ load_dotenv()
ENDPOINT = "/pally/result"
def calculate_signature(
payment_id: str,
status: str,
req_amount: str,
currency: str,
order_id: str,
out_sum: str,
inv_id: str,
pally_token: str,
) -> str:
raw = f"{payment_id}{status}{req_amount}{currency}{order_id}{pally_token}"
md5 = hashlib.md5(raw.encode()).hexdigest()
return hashlib.sha1(md5.encode()).hexdigest()
raw = f"{out_sum}:{inv_id}:{pally_token}"
return hashlib.md5(raw.encode()).hexdigest().upper()
def main():