Skip to main content

decode_payment_payload

Function decode_payment_payload 

Source
pub fn decode_payment_payload(
    header_value: &str,
) -> Result<PaymentPayloadEnum, HttpError>
Expand description

Decodes a PAYMENT-SIGNATURE or X-PAYMENT header value into a version-tagged payload enum.

Attempts V2 first, then falls back to V1.

ยงErrors

Returns HttpError on Base64 or JSON decode failure.