klasha_checkout

Last updated:

0 purchases

klasha_checkout Image
klasha_checkout Images
Add to Cart

Description:

klasha checkout

klasha_checkout #
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: ^0.0.1
copied to clipboard
How To Use #

In your file add the following import:

import 'package:klasha_checkout/klasha_checkout.dart';
copied to clipboard

Call the checkout method:

KlashaCheckout.checkout(
context,
email: _email,
amount: int.parse(_amount),
checkoutCurrency: _checkoutCurrency,
);
copied to clipboard

Handle the response of the checkout method

KlashaCheckout.checkout(
context,
// the onComplete callback returns the details of the just completed transaction
onComplete: (KlashaCheckoutResponse klashaCheckoutResponse) {
// the transaction reference of the just carried out transaction
print('checkout response transaction reference is ${klashaCheckoutResponse.transactionReference}');
// the status of the transaction
print('checkout response status is ${klashaCheckoutResponse.status}');
// a user readable message describing the status of the transaction
print('checkout response message is ${klashaCheckoutResponse.message}');

if (klashaCheckoutResponse.status) {
// show success dialog -> transaction successful

} else {
// show error dialog -> transaction not successful
}
},
);
copied to clipboard
Customizations #



Property
Description




email
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.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.