cancelPayment method

Future<PaymentStatus> cancelPayment()

Cancels the current payment and returns the PaymentStatus which is PaymentStatus.canceled

Implementation

Future<PaymentStatus> cancelPayment() async {
  _checkPaymentId();
  Constants.paymentId = paymentId;
  return (await _httpService.callApi<PaymentStatusResponse>(
          routeValue: RouteMap().routeMapper[Route.cancelPayment]!))
      .data
      .paymentStatus;
}