443a826402
The old code hashed the full raw body INCLUDING the 'signature' field itself — a circular computation that can never match (you can't include the signature in the data being signed). Fix: 1. Strip 'signature' key from payload before HMAC-SHA256 computation 2. Try both sorted and unsorted keys (PayPear docs don't specify) 3. Fallback to IP allowlist check (158.160.85.101 per PayPear docs) 4. Pass client_ip from request headers to the verification function