getHttpHeaders static method

Map<String, String> getHttpHeaders(
  1. PayEngineConfig config
)

Returns a map of HTTP headers based on the provided config.

The config parameter is an instance of PayEngineConfig which contains the necessary information to generate the HTTP headers.

Example usage:

PayEngineConfig config = PayEngineConfig();
Map<String, String> headers = getHttpHeaders(config);

Implementation

static Map<String, String> getHttpHeaders(PayEngineConfig config) {
  return {
    "Authorization":
        "Signature key=\"${config.publicKey}\",algorithm=\"hmac-sha256\",identifier=\"secure-fields\",signature=\"\""
  };
}