PaymentConfig class
Configuration class for payment providers
Constructors
-
PaymentConfig.new({required PaymentProvider provider, required String apiKey, required PaymentEnvironment environment, required String backendUrl, String? webhookUrl, Map<
String, String> ? customHeaders}) -
const
-
PaymentConfig.fromJson(Map<
String, dynamic> json) -
Create from JSON
factory
Properties
- apiKey → String
-
API key for the payment provider (public key only)
final
- backendUrl → String
-
Backend URL for payment processing
final
-
customHeaders
→ Map<
String, String> ? -
Optional custom headers for backend requests
final
- environment → PaymentEnvironment
-
Environment (sandbox or live)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- provider → PaymentProvider
-
The payment provider to use
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, thetoString
method will be overridden to output this instance'sprops
.no setterinherited - webhookUrl → String?
-
Optional webhook URL for payment notifications
final
Methods
-
copyWith(
{PaymentProvider? provider, String? apiKey, PaymentEnvironment? environment, String? backendUrl, String? webhookUrl, Map< String, String> ? customHeaders}) → PaymentConfig - Create a copy of this config with updated values
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON for backend communication
-
toString(
) → String - A string representation of this object.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited