throwIfProviderIsNotDefined method

Future<void> throwIfProviderIsNotDefined(
  1. PayProvider provider
)

Verifies that the selected provider has been previously configured or throws otherwise.

Implementation

Future<void> throwIfProviderIsNotDefined(PayProvider provider) async {
  if (!_configurations.containsKey(provider)) {
    throw ProviderNotConfiguredException(
        'No configuration has been provided for the provider ($provider)');
  }
}