createTestConfig static method
Create test config from externally provided credentials. Credentials should come from environment variables or secure backend.
Implementation
static MastercardConfig createTestConfig({
required String merchantId,
required String apiUsername,
required String apiPassword,
String gatewayUrl = 'https://ap-gateway.mastercard.com',
String currency = 'USD',
}) {
return MastercardConfig(
merchantId: merchantId,
apiUsername: apiUsername,
apiPassword: apiPassword,
gatewayUrl: gatewayUrl,
isTestMode: true,
merchantName: 'Lokotro Test Store',
merchantUrl: 'https://lokotro.com',
currency: currency,
);
}