pub fn decode_payment_payload( header_value: &str, ) -> Result<PaymentPayloadEnum, HttpError>
Decodes a PAYMENT-SIGNATURE or X-PAYMENT header value into a version-tagged payload enum.
PAYMENT-SIGNATURE
X-PAYMENT
Attempts V2 first, then falls back to V1.
Returns HttpError on Base64 or JSON decode failure.
HttpError