chargeCard method
Future<String?>
chargeCard(
- BuildContext context, {
- required double amount,
- required String accountType,
- String? pin,
- required ConnectivityType connectivityType,
override
Implementation
@override
Future<String?> chargeCard(BuildContext context,
{required double amount,
required String accountType,
String? pin,
required ConnectivityType connectivityType}) async {
var args = <String, dynamic>{
"amount": amount,
'account_type': '00',
'device_type': _getConnectivityCode(connectivityType),
//
'terminal_id': keyDetails!.tid!,
'port': keyDetails!.port!,
'master_key': keyDetails!.clrmasterkey!,
'pin_key': keyDetails!.clrpinkey!,
'ip': keyDetails!.ip!,
'session_key': keyDetails!.clrsesskey!,
'serial_number': aflliateInfo!.serialNumber!,
'mid': getMid(context).toString(),
'business_name': getBusinessName(context),
};
if (pin != null) {
args['pin'] = pin;
}
final res =
await methodChannel.invokeMethod<String>('startTransaction', args);
return res;
}