klasha_checkout_v2
A Flutter plugin for making payments via Klasha Checkout Technology
About
Klasha Flutter SDK allows you to build a quick, simple and excellent payment experience in your Flutter app. We provide powerful and customizable UI screens and elements that can be used out-of-the-box to collect your users' payment details via the Klasha Checkout Technology.
Installing
In the pubspec.yaml
of your flutter project, add the following dependency:
dependencies:
klasha_checkout_v2: ^1.0.2
How To Use
- In your file add the following import:
import 'package:klasha_checkout_v2/klasha_checkout_v2.dart';
- Call the
checkout
method and handle the response of thecheckout
method
KlashaCheckout.checkout(
context,
config: KlashaCheckoutConfig(
email: email!,
amount: int.parse(amount!),
checkoutCurrency: _checkoutCurrency,
authToken: 'your_auth_token',
onComplete: (KlashaCheckoutResponse klashaCheckoutResponse) {
print(klashaCheckoutResponse);
}
),
);
Customizations
Property | Description |
---|---|
The email of the customer. | |
amount | The amount to pay in the currency selected in checkoutCurrency , if the checkoutCurrency is not provided, it defaults to CheckoutCurrency.NGN. |
checkoutCurrency | The checkout currency to use, if the checkoutCurrency is not provided, it defaults to CheckoutCurrency.NGN. |
environment | The environment to use, if it is not provided, it defaults to Environment.TEST |
onComplete | This returns the status, message and transaction reference about the just carried out transaction. |
Contributions
Feel free to contribute to this project.
If you find a bug or want a feature, but don't know how to fix/implement it, please fill an issue. If you fixed a bug or implemented a feature, please send a pull request.