fix(pally): align webhook handler with official API spec
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user