InvalidResponseException.php 657 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. namespace Yansongda\Pay\Exception;
  4. use Throwable;
  5. class InvalidResponseException extends Exception
  6. {
  7. public ?Throwable $exception = null;
  8. /**
  9. * @var mixed
  10. */
  11. public $response;
  12. /**
  13. * @param mixed $extra
  14. */
  15. public function __construct(
  16. int $code = self::RESPONSE_ERROR,
  17. string $message = 'Provider response Error',
  18. $extra = null,
  19. ?Throwable $exception = null,
  20. Throwable $previous = null
  21. ) {
  22. $this->response = $extra;
  23. $this->exception = $exception;
  24. parent::__construct($message, $code, $extra, $previous);
  25. }
  26. }