charge method
- ZoopCharge charge
Implementation
Future<bool> charge(ZoopCharge charge) async {
try {
isCharging.add(true);
_errorMessage.add(null);
_terminalMessage.add(null);
_paymentMessage.add(null);
await _channel.invokeMethod('charge', jsonEncode(charge.toJson()));
return Future.value(true);
} catch (e) {
isCharging.add(false);
print('ERROR requestConnection ${e.toString()}');
throw Exception(e);
}
}