Last updated:
0 purchases
kaleplussdk
This package provides the sdk that integrates with the KalePlus loyalty app.
KalePlus app SDK allow POS provide to integrate the KalePlus App gift card and pay functionality. This works across multiple restaurant locations.
Features #
Allow POS to integrate with the KalePlus pay and gift card functionality.
Getting started #
Import the package and start using based on the usage code.
Usage #
Lets take a look at how to use KalePlus sdk.
KaleplusApi.dart #
KaleplusApi().initialize(
"chowbus",
"chowbus-secret",
"partnerLocationId",
"exampleKey",
Locale("en", null),
KaleplusEnv.dev
);
copied to clipboard
kaleplus-gf-page.dart #
await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => KaleplusGfPage(
staffName: "kyuramen",
desiredColor: Colors.red,
onGiftcardPurcahseResult: (GiftcardPurchaseResult am) {
if(am.status == GeneralStatus.success) {
am.purchasedItems?.forEach((element1) {
print("Detail ${element1.type.name} ${element1.tranId} ${element1.cardNo} ${element1.purchaseAmt} ${element1.cardAmt}");
});
} else {
if(am.partnerTranId.isNotEmpty) {
print("Refund the Chowbus credit card charges now ${am.partnerTranId}");
showDialog(
context: context,
builder: (context) => AlertDialog(
content: Text("${KaleplusTranslations().text("failGift")}"),
));
}
}
Navigator.pop(context);
},
onGiftcardCharge: (chargeAmt, lastFewCardNo) async {
print("Charge the credit card here ${chargeAmt} ${lastFewCardNo}");
return ChargeAmtCallbackResult(GeneralStatus.success, "chowbusTranId");
})));
copied to clipboard
kaleplus-pay-page.dart #
DebitResponse? debitResp = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => KaleplusPayPage(
debitRequest, desiredColor: Colors.red)
),
);
if(debitResp != null) {
var msg = "";
if(debitResp.status == DebitStatus.fullyPaid) {
msg = "fully paid ${debitResp.tranId} ${debitResp.amtDebited} ${debitResp.tip} ${debitResp.remainingBalance} ${debitResp.last4}";
} else if(debitResp.status == DebitStatus.partiallyPaid) {
msg = "partial paid ${debitResp.tranId} ${debitResp.amtDebited} ${debitResp.tip} ${debitResp.remainingBalance}";
} else {
msg = "fail";
}
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("result show here"),
content: Text("${msg}"),
actions: [
MaterialButton(
child: Text("OK"),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
copied to clipboard
Additional information #
You can integrate with our loyalty app and find more information at https://kaleplus.com
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.