http_code = $http_code; $this->error_type = $error_type; $this->decline_code = $decline_code; parent::__construct( $message, $error_code, $code, $previous ); } /** * Returns the HTTP code. * * @return int HTTP code, for example 404. */ public function get_http_code() { return $this->http_code; } /** * Returns the error type attribute from the server. * * @return string|null Error type, for example 'api_error' or 'card_error'. */ public function get_error_type() { return $this->error_type; } /** * Returns the decline code attribute from the server. * * @return string|null Decline code, for example 'expired_card' or 'insufficient_funds'. */ public function get_decline_code() { return $this->decline_code; } }