Last updated:
0 purchases
klump checkout
Klump Checkout Flutter Plugin #
Flutter Plugin for implementing the Klump Checkout - Klump is a modern, simple to use platform that allows the user to collect payments from customers in instalments using a payment card (debit or credit) or a bank account.
Before getting started #
Create a merchant account on useklump
Checkout our get started guide to create your mechant account and retrieve your API Keys.
Getting Started #
This library would help you add Klump Checkout to your hybrid android/ios application in no time. All you need to do is ...
Install #
To use this plugin, add klump_checkout as a dependency in your pubspec.yaml file.
dependencies:
klump_checkout: ^1.0.17
copied to clipboard
Usage #
Flow Summary #
Collect Klump checkout data.
Initialize the KlumpCheckout by creating an object of the KlumpCheckout class.
Call the pay method with the isLive, context and data named paramaters to render the Klump checkout view.
Once request is successful, KlumpCheckoutResponse object is return.
Installation #
To start using this package, simply add the following to project pubspec.yaml
klump_checkout: <lastest-version>
copied to clipboard
Usage #
1. Permissions #
To use this package, your android app must declare internet permission. Add the following code to the application level of your AndroidManifest.xml.
<uses-permission android:name="android.permission.INTERNET" />
copied to clipboard
2. Initializing Plugin #
To use [klump_checkout] SDK, you need to first initialize it by using the KlumpCheckout class.
final klumpCheckout = KlumpCheckout();
copied to clipboard
3. Perform ckeckout with klump_checkout UI #
Payment transaction can be made with the pay method:
Parameters #
isLive boolean - pass true for live envireoment and false for test environment
context BuildContext.
data the KlumpCheckoutData .
final res = await klumpCheckout.pay(
isLive: false,
context: context,
data: const KlumpCheckoutData(
merchantPublicKey:
'klp_pk_test_e4aaa1a8e96644ad9af23fa453ddd6ffa39a8233a88c4b93860f119c8cd9a332',
amount: 45000,
shippingFee: 5000,
merchantReference: "what-ever-you-want-this-to-be",
metaData: {
'customer': "Elon Musk",
'email': "[email protected]",
},
items: [
KlumpCheckoutItem(
imageUrl:
'https://s3.amazonaws.com/uifaces/faces/twitter/ladylexy/128.jpg',
itemUrl: 'https://www.paypal.com/in/webapps/mpp/home',
name: 'Awesome item',
unitPrice: 20000,
quantity: 2,
)
],
shippingData: {
"address": "Ediam road Akppa",
"landmark": "extras",
"city_id": "da513ab9-a28e-4451-af6b-16f029be2c37"
},
),
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.