init static method

void init({
  1. int identifierLength = 20,
  2. PaygateVersion? apiVersion,
  3. required String apiKey,
  4. String? apiKeyDebug,
})

Initialize plugin.

Implementation

static void init({
  int identifierLength = 20,
  PaygateVersion? apiVersion,
  required String apiKey,
  String? apiKeyDebug,
}) {
  PaygateConfig.version = apiVersion ?? PaygateVersion.v2;
  PaygateConfig.paygateAPIKeyProd = apiKey;
  PaygateConfig.paygateAPIKeyDebug = apiKeyDebug ?? apiKey;
  PaygateConfig.transactionIdentifierLength = identifierLength;
}