LokotroCommonService class

Enhanced common service for Lokotro Pay with RxDart integration and modern state management

Properties

appKey String?
no setter
availablePaymentMethods List?
no setter
currentMessage LokotroPayResponseMessage?
no setter
currentPaymentInfo LokotroPayRequestResponse?
no setter
currentScreen LokotroPayScreenNavigation
no setter
currentTransactionId String?
no setter
hashCode int
The hash code for this object.
no setterinherited
isLoading bool
no setter
otpSentTo String?
no setter
paymentMessageStream Stream<LokotroPayResponseMessage?>
no setter
paymentMethodFees List?
no setter
paymentProcessInfoStream Stream<LokotroPayRequestResponse?>
no setter
paymentScreenStream Stream<LokotroPayScreenNavigation>
no setter
personalInfo Map<String, String>?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spinnerStream Stream<bool>
no setter
successResponse LokotroPayOnResponse?
no setter
transactionDetails Map<String, dynamic>?
no setter

Methods

cancelPayment(String transactionId) Future<void>
Cancel payment
fetchAvailableBanks() Future<List<LokotroBank>>
Fetch available banks for bank transfer
getTransactionForPaymentProcess({required String url, required String token}) Future<void>
Fetch payment information for processing
Update payment screen navigation
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processPayment({required String paymentMethodId, required Map<String, dynamic> paymentData}) Future<void>
Process payment with selected method via the real payment API.
resetPaymentMessage() → void
resetState() → void
Reset service state
resetTransactionState() → void
Reset transaction state for retry functionality
setAppKey(String appKey) → void
@deprecated Use setSessionToken. Removed in 4.x.
setErrorMessage(String message, {String title = 'Error'}) → void
Set error message
setInfoMessage(String message, {String title = 'Information'}) → void
Set info message
setLoading(bool isLoading) → void
Show/hide loading spinner
setOtpInfo(String transactionId, String otpSentTo) → void
Set OTP information for verification
setPaymentMessage(LokotroPayResponseMessage message) → void
Set payment message
setPaymentMethodsData(List methods, List fees) → void
Set payment methods data for selection screen
setPaymentProcessInfo(LokotroPayRequestResponse response) → void
Set payment process info (for testing/mocking)
setPersonalInfo({required String firstName, required String lastName, required String email, required String phoneNumber}) → void
Set personal information for payment processing
setSelectedPaymentMethodId(String paymentMethodId) → void
Set selected payment method ID in transaction details
setSessionToken(String sessionToken) → void
Set session token for authentication (Auth-v3).
setSuccessMessage(String message, {String title = 'Success'}) → void
Set success message
setSuccessResponse(LokotroPayOnResponse response) → void
Set success response with real payment data
setTransactionDetails(Map<String, dynamic> details) → void
Set transaction details from API response
setWarningMessage(String message, {String title = 'Warning'}) → void
Set warning message
toString() String
A string representation of this object.
inherited
verifyPayment(String transactionId) Future<void>
Verify payment status

Operators

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

Static Properties

instance LokotroCommonService
Get singleton instance
no setter

Static Methods

reset() → void
Reset instance (for testing)