PaymentResult class
Outcome of a payment attempt, returned by SwichPay.pay and delivered to SwichPay.onResult.
Constructors
-
PaymentResult({required bool isSuccess, required String status, String? code, String? message, String? timestamp, String? orderId, String? redirectUrl, bool isRedirectionRequired = false, String? merchantRedirectionUrl, int? remainingAttempts, String? consumerNumber, Map<
String, String> ? redirectFormFields, String? postUrl, Map<String, dynamic> ? continuation, String? ddcCollectionUrl, String? vendorTransactionId, String? stepUpUrl, String? qrString, bool otpRequired = false, String? bankTransactionId, String? transactionReferenceNo, String? retreivalReferenceNo}) -
PaymentResult.fromJson(Map<
String, dynamic> json) -
factory
Properties
- bankTransactionId → String?
-
Direct Bank Transfer OTP response's
transactionId, echoed back on the confirm call.final - code → String?
-
final
- consumerNumber → String?
-
Biller (1Bill) consumer number; still needs a follow-up "Verify Payment" call.
final
-
continuation
→ Map<
String, dynamic> ? -
Card 3-D Secure - raw
data.nextAction.continuation, relayed verbatim intoPaymentEnrollment.final - ddcCollectionUrl → String?
-
Card 3-D Secure - Cardinal Cruise DDC URL to POST redirectFormFields to; distinct from postUrl.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRedirectionRequired → bool
-
final
- isSuccess → bool
-
final
- merchantRedirectionUrl → String?
-
final
- message → String?
-
final
- orderId → String?
-
SwichPay's order identifier for a successful payment.
final
- otpRequired → bool
-
truewhen the vendor wants an OTP before this payment completes.final - postUrl → String?
-
Hosted JazzCash orchestrator form URL; actionable for card 3-D Secure only.
final
- qrString → String?
-
QR (RAAST) - raw string to render as a scannable code.
final
-
redirectFormFields
→ Map<
String, String> ? -
Card 3-D Secure - DDC step's form fields (e.g.
JWT), POSTed to redirectUrl.final - redirectUrl → String?
-
Where to redirect the user if isRedirectionRequired is true (e.g. for 3-D Secure).
final
- remainingAttempts → int?
-
Payment attempts left on the session after this attempt, if the API returned one.
final
- retreivalReferenceNo → String?
-
Direct Bank Transfer OTP response's
retreivalReferenceNo(matches wire spelling), echoed back on confirm.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → String
-
Raw
statusvalue from the API, e.g."success"or"failed".final - stepUpUrl → String?
-
Card 3-D Secure - OTP step-up URL; POST redirectFormFields to it, then show the resulting HTML.
final
- timestamp → String?
-
final
- transactionReferenceNo → String?
-
Direct Bank Transfer OTP response's
transactionReferenceNo, echoed back on confirm.final - vendorTransactionId → String?
-
Card 3-D Secure - vendor transaction ID, relayed as
vendorTxIdintoPaymentEnrollment.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