Fix using an undefined index when checking the nonce.
Sort the POST fields by key before validating the HMAC.