checkout method
Future<CheckoutResponse>
checkout(
- BuildContext context,
- CheckoutMethod checkoutmethod,
- String identifier, {
- String? bvn,
- String? nin,
override
Implementation
@override
Future<CheckoutResponse> checkout(
BuildContext context,
CheckoutMethod checkoutmethod,
String identifier, {
String? bvn,
String? nin,
}) async {
// assert(() {
// _validateChargeAndKey(charge);
// return true;
// }());
_performChecks();
controller.checkoutmethod = checkoutmethod;
controller.identifier = identifier;
if (bvn != null && bvn.isNotEmpty) {
controller.directcheckout = true;
controller.bvnController.text = bvn;
controller.stage = 1;
}
if (nin != null && nin.isNotEmpty) {
controller.directcheckout = true;
controller.bvnController.text = nin;
controller.stage = 1;
}
CheckoutResponse? response = await showDialog(
barrierDismissible: false,
context: context,
builder: (BuildContext context) => CheckoutWidget(),
);
controller.directcheckout = false;
return response!;
}