Errors.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace Culqi\Error;
  3. /**
  4. * Culqi Exceptions
  5. */
  6. /**
  7. * Base Culqi Exception
  8. */
  9. class CulqiException extends \Exception {
  10. protected $message = "Base Culqi Exception";
  11. }
  12. /**
  13. * Input validation error
  14. */
  15. namespace Culqi\Error;
  16. class InputValidationError extends CulqiException {
  17. protected $message = "Error de validacion en los campos";
  18. }
  19. /**
  20. * Authentication error
  21. */
  22. namespace Culqi\Error;
  23. class AuthenticationError extends CulqiException {
  24. protected $message = "Error de autenticación";
  25. }
  26. /**
  27. * Resource not found
  28. */
  29. namespace Culqi\Error;
  30. class NotFound extends CulqiException {
  31. protected $message = "Recurso no encontrado";
  32. }
  33. /**
  34. * Method not allowed
  35. */
  36. namespace Culqi\Error;
  37. class MethodNotAllowed extends CulqiException {
  38. protected $message = "Method not allowed";
  39. }
  40. /**
  41. * Unhandled error
  42. */
  43. namespace Culqi\Error;
  44. class UnhandledError extends CulqiException {
  45. protected $message = "Unhandled error";
  46. }
  47. /**
  48. * Invalid API Key
  49. */
  50. namespace Culqi\Error;
  51. class InvalidApiKey extends CulqiException {
  52. protected $message = "API Key invalido";
  53. }
  54. /**
  55. * Unable to connect to Culqi API
  56. */
  57. class UnableToConnect extends CulqiException {
  58. protected $message = "Imposible conectar a Culqi API";
  59. }