getCardType method
Implementation
Future<Response> getCardType(String cardNumber, String merchantId) async {
final getCardTypeRequestJson =
jsonEncode({"cardBin": cardNumber, "meid": merchantId});
//debugPrint('Calling api get card type ${StringConstants.getCardType} with body $getCardTypeRequestJson');
final Map<String, String> headers = <String, String>{
'Content-Type': 'application/json',
};
try {
final Response response = await http.post(
Uri.parse(StringConstants.getCardType),
body: getCardTypeRequestJson,
headers: headers);
return response;
} catch (e) {
//debugPrint('Get Card Type api exception is ${e.toString()}');
rethrow;
}
}