MidtransConfig class

Configuration class for Midtrans integration.

Use this class to configure the Midtrans SDK with your merchant information and settings.

Constructors

MidtransConfig({required String merchantClientKey, required String merchantUrl, bool enableLog = true, String? gopayCallbackUrl, String? shopeePayCallbackUrl, PermataVa? permataVa, BcaVa? bcaVa, BniVa? bniVa, PaymentTypeConfig? paymentTypeConfig})
Creates a new instance of MidtransConfig.

Properties

bcaVa BcaVa?
Configuration for BCA Virtual Account payment method.
final
bniVa BniVa?
Configuration for BNI Virtual Account payment method.
final
enableLog bool
Whether logging is enabled or not. Default is true.
final
gopayCallbackUrl String?
URL to handle GoPay callback.
final
hashCode int
The hash code for this object.
no setterinherited
merchantClientKey String
Your Midtrans client key provided by the merchant dashboard.
final
merchantUrl String
Base URL for Midtrans API endpoints.
final
paymentTypeConfig PaymentTypeConfig?
Configuration for payment type.
final
permataVa PermataVa?
Configuration for Permata Virtual Account payment method.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shopeePayCallbackUrl String?
URL to handle ShopeePay callback deep link.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the configuration to a JSON representation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited