Package com.stripe.exception

Examples of com.stripe.exception.APIException


    case 401:
      throw new AuthenticationException(error.message);
    case 402:
      throw new CardException(error.message, error.code, error.param, null);
    default:
      throw new APIException(error.message, null);
    }
  }
View Full Code Here


          .getDeclaredMethod("getResponseCode").invoke(response);
      String body = new String((byte[]) response.getClass()
          .getDeclaredMethod("getContent").invoke(response), CHARSET);
      return new StripeResponse(responseCode, body);
    } catch (InvocationTargetException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (MalformedURLException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (NoSuchFieldException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (SecurityException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (NoSuchMethodException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (ClassNotFoundException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (IllegalArgumentException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (IllegalAccessException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (InstantiationException e) {
      throw new APIException(unknownErrorMessage, e);
    } catch (UnsupportedEncodingException e) {
      throw new APIException(unknownErrorMessage, e);
    }
  }
View Full Code Here

TOP

Related Classes of com.stripe.exception.APIException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.