PaymentResponse class

Parsed envelope for POST .../sdk/payment JSON (success, failure, risk decline, etc.).

The nested data object is typed as SdkPaymentTransactionData when data is a map.

Inheritance

Constructors

PaymentResponse({required Map<String, dynamic> raw, required String status, required String code, required String? message, SdkPaymentTransactionData? data})
PaymentResponse.fromJson(Map<String, dynamic> json)
factory

Properties

code String
Top-level code (e.g. 00, PAYMENT_RISK_RULE_HIT, CVV_REQUIRED).
final
data SdkPaymentTransactionData?
Parsed data when it is a JSON object; otherwise null (e.g. empty array or primitive).
final
hashCode int
The hash code for this object.
no setterinherited
isGatewayOk bool
Gateway success with code 00 (typical happy path).
no setter
isStatusFailed bool
no setter
isStatusSuccess bool
no setter
isSuccess bool
finalinherited
message String?
finalinherited
raw Map<String, dynamic>
Original JSON (same reference as passed to fromJson when built from a modifiable map).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status String
Top-level status (e.g. success, failed, requires_action).
final

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

tryParse(dynamic json) PaymentResponse?
Safe parse when the payload may not be a map.