diff --git a/README.md b/README.md index 5348a7b..f499f22 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ -[![GitHub license](https://img.shields.io/github/license/fawno/AEAT.svg)](https://github.com/fawno/AEAT/blob/master/LICENSE) -[![GitHub release](https://img.shields.io/github/release/fawno/AEAT.svg)](https://github.com/fawno/AEAT/releases) -[![Packagist](https://img.shields.io/packagist/v/fawno/AEAT.svg)](https://packagist.org/packages/fawno/aeat) +[![GitHub license](https://img.shields.io/github/license/fawno/AEAT)](https://github.com/fawno/AEAT/blob/master/LICENSE) +[![GitHub release](https://img.shields.io/github/release/fawno/AEAT)](https://github.com/fawno/AEAT/releases) +[![Packagist](https://img.shields.io/packagist/v/fawno/AEAT)](https://packagist.org/packages/fawno/aeat) [![Packagist Downloads](https://img.shields.io/packagist/dt/fawno/AEAT)](https://packagist.org/packages/fawno/aeat/stats) -[![Documentation](https://img.shields.io/badge/manual-wsdlVNif-blue.svg)](docs/wsdlVNif.md) +[![GitHub issues](https://img.shields.io/github/issues/fawno/AEAT)](https://github.com/fawno/AEAT/issues) +[![GitHub forks](https://img.shields.io/github/forks/fawno/AEAT)](https://github.com/fawno/AEAT/network) +[![GitHub stars](https://img.shields.io/github/stars/fawno/AEAT)](https://github.com/fawno/AEAT/stargazers) +[![Documentation](https://img.shields.io/badge/manual-wsdlVNif-blue)](docs/wsdlVNif.md) # AEAT Clases para los servicios web de la [AEAT](http://www.agenciatributaria.es/) diff --git a/composer.json b/composer.json index 54dcf4d..a453dc5 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "fawno/aeat", - "version": "1.0.2", + "version": "1.0.3", "description": "Clases para los servicios web de la AEAT", "license": "MIT", "authors": [ diff --git a/src/wsdlVNif.php b/src/wsdlVNif.php index d92d55b..ce54fc5 100644 --- a/src/wsdlVNif.php +++ b/src/wsdlVNif.php @@ -30,7 +30,7 @@ public function __construct ($local_cert, $passphrase, $options = [], $ssl_verif protected function stream_context ($ssl_verifypeer = true, $options = []) { $options['http']['user_agent'] = 'PHPSoapClient'; $options['ssl']['ciphers'] = 'DEFAULT@SECLEVEL=1'; - + if (!$ssl_verifypeer) { $options['ssl']['verify_peer'] = false; $options['ssl']['verify_peer_name'] = false; @@ -51,8 +51,8 @@ public function VNif ($contribuyentes) { public function VNifV2 ($contribuyentes) { return $this->__soapCall('VNifV2', [['Contribuyente' => $contribuyentes]]); } - - public function nif_validation ($nif) { + + public static function nif_validation ($nif) { if (preg_match('~(ES)?([\w\d]{9})~', strtoupper($nif), $parts)) { $nif = end($parts); if (preg_match('~(^[XYZ\d]\d{7})([TRWAGMYFPDXBNJZSQVHLCKE]$)~', $nif, $parts)) {