init static method

Future<bool?> init({
  1. required String key,
  2. Environment environment = Environment.SANDBOX,
})

Initialize Checkout.com payment SDK.

key public sdk key. environment the environment of initialization { SANDBOX, LIVE }, default SANDBOX.

Implementation

static Future<bool?> init({required String key, Environment environment = Environment.SANDBOX}) async {
  try {
    return await _channel.invokeMethod(METHOD_INIT, <String, String>{'key': key, 'environment': environment.toString()});
  } on PlatformException catch (e) {
    throw FlutterCheckoutException.fromPlatformException(e);
  }
}