pay_unit_sdk 3.1.13 pay_unit_sdk: ^3.1.13 copied to clipboard
Library flutter of the most complete payment aggregator of Cameroon, pay integrate ORANGE, MTN, PAYPAL and EXPRESS UNION in some click in your Flutter application
Welcome to The Pay Unit Flutter SDK Seamlessly accept and manage payments in your app
Description #
Pay Unit SDK Package facilitates the intergration of payments on your applications with a single button and on the go.
Installation #
Run this command:
With dart #
dart pub add pay_unit_sdk
With Flutter #
flutter pub add pay_unit_sdk
Manually #
dependencies:
pay_unit_sdk: ^3.1.5
Import package #
import 'package:pay_unit_sdk/pay_unit_sdk.dart';
Add mavenCentral() to your project #
- Add mavenCentral() to allprojects in gradle > build.gradle .
allprojects {
repositories {
google()
mavenCentral() <---
jcenter()
}
}
Add the PayUnitButton #
PayUnitButton(
apiUser: "Your apiuser>",
apiPassword: "<Your apiPassword>",
apiKey: "<Your apiKey>",
transactionId: "<The id of your transaction>",
mode: 'sandbox',
transactionCallBackUrl:"<Your transactionCallBackUrl url>",
notiFyUrl: "<Your notification url>",
transactionAmount: "<Your transaction amount>",
currency:"XAF",
buttonTextColor: Colors.white,
productName:"<The name of the product>",
color: Colors.teal
actionAfterProccess: (transactionId, transactionStatus) {
a callback that has both transaction id and transaction status
},
),
PayUnit Button Parameters #
- apiUser : Your apiuser is provided on your payunit dashboard and looks like "payunit_xxxxxxxx"
- Mode : Your Mode can either be sandbox or live.
- Currency : The currency of your transaction : XAF for FCFA or USD for $ ect ...
- buttonTextColor: Custom the color of the text PayUnit button
- color : Use this to customise the colors of the PayUnit Button
- actionAfterProccess : here is the action who start after the end of the paiement , you can perform some operation here , like display a alertDialog after the end of the payment.
- transactionId and transactionStatus are callBack parameters of the actionAfterProccess function , don't modify them .
Heads Up #
- FOR FLUTTER VERSION < 2.x ==> 2.0.4 without Cupertino package because the package already has it
- Make sure the icon of your app is locate is like @mipmap/ic_launcher . to get the PayUnit sdk notification in your app after every transaction
- NEW Pay_unit_sdk VERSION 2.0.7 ==> Support Flutter 2.x
- To use this package, all you need to do is follow the instruction bellow, Please Download the recent version of the SDK
- minSdkVersion 19
- Use flutter sdk v.1.22.0 +