MastercardTest class
Test Mastercard Integration
IMPORTANT: Never hardcode credentials in source code. All credentials must be provided at runtime via environment or secure storage.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
createTestConfig(
{required String merchantId, required String apiUsername, required String apiPassword, String gatewayUrl = 'https://ap-gateway.mastercard.com', String currency = 'USD'}) → MastercardConfig - Create test config from externally provided credentials. Credentials should come from environment variables or secure backend.
-
quickConnectivityTest(
{required MastercardConfig config}) → Future< bool> - Quick connectivity test
-
testApiConnectivity(
{required MastercardConfig config}) → Future< bool> - Test basic API connectivity
-
testPaymentProcessing(
{required MastercardConfig config, required MastercardCardDetails cardDetails}) → Future< void> - Test payment processing with provided card details