Khalti class

The entrypoint class for Khalti.

Properties

hashCode int
The hash code for this object.
no setterinherited
onMessage OnMessage
Callback for when any exceptions occur.
final
onPaymentResult OnPaymentResult
A callback which is to be triggered when any payment is made.
final
onReturn OnReturn?
Callback for when user is redirected to return_url.
final
payConfig KhaltiPayConfig
Config class necessary to hold all the necessary informations needed to initialize the SDK.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

close(BuildContext context) → void
Helper method to close the webview.
fetchPaymentDetail() Future<PaymentDetailModel>
Helper method to call payment detail fetching API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(BuildContext context) → void
Method to load webview to be able to make payment.
toString() String
A string representation of this object.
inherited
verify() Future<void>
Helper method to call payment verification API.

Operators

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

Static Properties

debugKhaltiServiceOverride KhaltiService
Overrides Khalti.service with the provided service.
no getter
service KhaltiService
A http service to make requests to Khalti APIs.
no setter

Static Methods

init({required KhaltiPayConfig payConfig, required OnPaymentResult onPaymentResult, required OnMessage onMessage, OnReturn? onReturn, bool enableDebugging = false}) Future<Khalti>
Initializes Khalti Configuration.