@bates-solutions/payments-core API Reference - v0.2.0
    Preparing search index...

    Function toBase64

    • Bytes as standard base64 (RFC 4648, + and /, with = padding), the encoding Square uses for its webhook signatures.

      Parameters

      • bytes: ArrayBuffer | Uint8Array<ArrayBufferLike>

      Returns string

      toBase64(new TextEncoder().encode('hi')); // 'aGk='