getMerchantPayModeAndScheme method

Future<Response> getMerchantPayModeAndScheme(
  1. String merchantId
)

Implementation

Future<Response> getMerchantPayModeAndScheme(String merchantId) async {
  //debugPrint('Calling get merchant pay modes and scheme api ${StringConstants.getPaymentMode} with merchantId $merchantId');

  final Map<String, String> headers = <String, String>{
    'Content-Type': 'application/json',
  };

  final getMerchantDetailsRequestJson = jsonEncode({"me_id": merchantId});

  try {
    final Response response = await http.post(
        Uri.parse(StringConstants.getPaymentMode),
        body: getMerchantDetailsRequestJson,
        headers: headers);
    return response;
  } catch (e) {
    //debugPrint('Fetch merchant payment mode api exception is ${e.toString()}');
    rethrow;
  }
}