pay_unit_sdk 1.0.21 copy "pay_unit_sdk: ^1.0.21" to clipboard
pay_unit_sdk: ^1.0.21 copied to clipboard

outdated

A new Flutter package to pay bill with Pay unit system.

pay_unit_sdk #

A Pay unit sdk package.

Screenshot_2021-01-29-00-22-35-334_com sevengps eneopayappskeletteforsdk

To use this package, all you need to do is follow the instruction bellow , Please Download the recent version of the SDK . #

Use flutter sdk v.1.22.0 + #

Add mavenCentral() to your project . #

Add mavenCentral() to allprojects in gradle > build.gradle .

allprojects {
    repositories {
        google()
        mavenCentral() <---
        jcenter()
    }
}

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 #

Add Pay unit to your app . #

 PayUnitButton(
	          apiKey: "<Your apiKey>",
              apiUser: "<Your apiuser>",
              apiPassword: "<Your apiPassword>",
              transactionId: "<The id of your transaction>",
              mode:"<Your usage mode>", // 'sandbox' or 'live' for production mode
              transactionCallBackUrl: "<Your transactionCallBackUrl url>",
              notiFyUrl: "<Your notification url>",
              transactionAmount: "<Your transaction amount>",
              currency: "XAF", //// The currency of your transaction : XAF for FCFA or USD for $ ect ...
              color:"<Custom color of the button Example: Colors.red>", DEFAULT IS Theme.of(context).primaryColor)
              buttonTextColor:" Colors.white", ///the colors of the PayUnit Button text DEFAULT WHITE
              productName:"<The name of the product>",
              actionAfterProccess: (transactionId,  transactionStatus) {
		//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.
                             if(transactionStatus!="FAILED"){
                                         AwesomeDialog(
                                             dismissOnBackKeyPress: false,
                                             dismissOnTouchOutside: false,
                                             context: context,
                                             dialogType: DialogType.SUCCES,
                                             animType: AnimType.BOTTOMSLIDE,
                                             title: "Pay unit",
                                             desc: "Your transaction : $transactionId was successful",
                                             btnOkColor: Colors.green,
                                             btnOkText: "Ok",
                                             btnOkOnPress: () async {
                                             })
                                           ..show();
                                       }else{
                                         AwesomeDialog(
                                             dismissOnBackKeyPress: false,
                                             dismissOnTouchOutside: false,
                                             context: context,
                                             dialogType: DialogType.ERROR,
                                             animType: AnimType.BOTTOMSLIDE,
                                             title: "PayUnit",
                                             desc: "Your transaction : $transactionId was Failed",
                                             btnOkColor: Colors.red,
                                             btnOkText: "Ok",
                                             btnOkOnPress: () async {
                                             })
                                           ..show();
                                       }
              },
            ),