This was fixed thanks to this python function found online: https://www.deanmalan.co.za/2023/2023-02-08-calculate-payfast-signature.html#solution-code