cancelPayment method

Future cancelPayment()

Implementation

Future cancelPayment() async {
  try {
    isLoading.value = true;
    await c4bservices.cancelPayments(paymentID);
    isLoading.value = false;
  } catch (e, s) {
    if (e is SocketException) {
      debugPrint("Get currency details controller error $e $s");
      Get.snackbar('Internet Error', "Couldn't get cancel payment");
    } else {
      debugPrint("Get currency details controller error $e $s");
      Get.snackbar('Error', "Couldn't cancel payment");
    }
    isLoading.value = false;
    rethrow;
  }
}