PaymentSuccess class
A successful payment outcome.
Contains optional provider-specific data, such as transaction reference, amount, currency, or other metadata returned by the gateway.
Example:
if (result is PaymentSuccess) {
print('Ref: ${result.data?['reference']}');
}
- Inheritance
-
- Object
- PaymentResult
- PaymentSuccess
Constructors
-
PaymentSuccess.new(String gatewayName, {Map<
String, dynamic> ? data}) -
Creates a successful result from
gatewayName
with optionaldata
.const
Properties
-
data
→ Map<
String, dynamic> ? -
Provider-specific data payload (e.g., reference, amount, currency).
final
- gatewayName → String
-
The human-readable name of the payment gateway that produced this result
(e.g.,
"Paystack"
,"Mollie"
).finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isSuccess → bool
-
Whether this result represents a successful payment.
no setteroverride
- 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