KhaltiService class
The wrapper class to access Khalti Payment Gateway API.
Constructors
- KhaltiService({required KhaltiClient client})
- Default constructor for KhaltiService to initialize KhaltiClient.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildBankUrl(
{required String bankId, required String mobile, required int amount, required String productIdentity, required String productName, required PaymentType paymentType, required String returnUrl, String? productUrl, Map< String, Object> ? additionalData}) → String - Constructs a bank payment URL.
-
confirmPayment(
{required PaymentConfirmationRequestModel request}) → Future< PaymentSuccessModel> - Confirms the payment.
-
getBanks(
{required PaymentType paymentType}) → Future< BankListModel> -
Fetches the list for available banks that supports
paymentType
. -
initiatePayment(
{required PaymentInitiationRequestModel request}) → Future< PaymentInitiationResponseModel> - Initiates the payment.
-
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 Properties
- config ↔ KhaltiConfig
-
The default platform only configuration.
getter/setter pair
- enableDebugging ↔ bool
-
Enabling enableDebugging will print network logs.
getter/setter pair
- publicKey ↔ String
-
The publicKey configured using KhaltiService.publicKey.
getter/setter pair