paymentProcess method

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

Implementation

@override
Future<Either<Failure, bool>> paymentProcess({
  Map<String, dynamic>? param,
}) async {
  try {
    final response = await httpHandler.post(
      url: Api.payment.paymentProcess,
      requestBody: param,
      isUrlPG: true,
    );

    final result = response["success"];

    return Right(((result is bool)) ? result : true);
  } on Exception catch (error) {
    return Left(FailureResponse.mapExceptionToFailure(error));
  }
}