PhonePeConfig constructor

const PhonePeConfig({
  1. required PhonePeEnvironment environment,
  2. required String merchantId,
  3. required String saltKey,
  4. required String saltIndex,
  5. Map<String, String> headers = const {},
  6. bool enableLogs = true,
  7. String packageName = 'com.phonepe.simulator',
  8. String flowId = '',
})

Creates a new PhonePeConfig.

  • environment must be set to either PhonePeEnvironment.sandbox or PhonePeEnvironment.production.
  • merchantId, saltKey, and saltIndex must be provided as part of your credentials.
  • Optional values such as headers, enableLogs, packageName, and flowId can be used to customize the behavior.

Implementation

const PhonePeConfig({
  required this.environment,
  required this.merchantId,
  required this.saltKey,
  required this.saltIndex,
  this.headers = const {},
  this.enableLogs = true,
  this.packageName = 'com.phonepe.simulator',
  this.flowId = '',
});