getPaymentMethod method

  1. @override
Future<Either<Failure, PaymentMethod>> getPaymentMethod({
  1. Map<String, dynamic>? param,
})
override

Implementation

@override
Future<Either<Failure, PaymentMethod>> getPaymentMethod({
  Map<String, dynamic>? param,
}) async {
  try {
    // String url = HttptUrlBuilder.createWdomain(IncommeConstants.appApi.endpoint.channelMethod);

    final response = await httpHandler.get(
      url: Api.payment.channelMethod,
      withAccessToken: true,
      queryParameters: param,
      isUrlPG: true,
    );

    return Right(PaymentMethodDto.fromJson(response).jsonResult);
  } on Exception catch (error) {
    return Left(FailureResponse.mapExceptionToFailure(error));
  }
}