2017 © Pedro PelĂĄez
 

library ewus

eWUÚ integration for Laravel

image

dartui/ewus

eWUÚ integration for Laravel

  • Wednesday, July 18, 2018
  • by Dartui
  • Repository
  • 1 Watchers
  • 0 Stars
  • 113 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 82 % Grown

The README.md

AS OF 2020-09-21 THIS PACKAGE IS UNMAINTAINED

Please switch to https://github.com/etermed/ewus-php or other implementation., (*1)


Laravel eWUÚ

eWUÚ integration for Laravel, (*2)

Usage

use Dartui\Ewus\Facade as Ewus;

class Foo {
    public function pesel() {
        // 1st param (int)      patient PESEL
        // 2nd param (int|bool) cache duration (in hours)
        // 3rd param (bool)     force request to eWUÚ (even if 2nd param is set to non-false value)
        $pesel = Ewus::pesel( '00000000000', 6 );

        if ( $pesel->hasError() ) {
            // do something with $pesel->getError()
        } elseif ( $pesel->hasInsurance() ) {
            $first_name   = $pesel->getFirstName();
            $last_name    = $pesel->getLastName();
            $operation_id = $pesel->getOperationID();
        }
    }

    // new password will be automatically stored in .ewus file
    public function password() {
        $new_password = 'secret';

        if ( Ewus::password( $new_password ) ) {
            echo 'Success!';
        } else {
            echo 'Error';
        }
    }
}

PeselResponse methods

  • getResponse()
  • getError()
  • getStatus()
  • getFirstName()
  • getLastName()
  • getOperationID()
  • getDomain()
  • hasError()
  • hasResponse()
  • hasInsurance()

Instalation

Require this package with composer:, (*3)

composer require dartui/ewus

After updating composer, add the ServiceProvider to the providers array in config/app.php, (*4)

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider, (*5)

Dartui\Ewus\ServiceProvider::class

Copy the package config to your local config with the publish command:, (*6)

php artisan vendor:publish --provider=Dartui\\Ewus\\ServiceProvider

Add values to your .env file, for example:, (*7)

EWUS_LOGIN=mylogin
EWUS_TYPE=SWD
EWUS_DOMAIN=11
EWUS_CODE=123456

And create .ewus file in root of your project in which will be stored password., (*8)

The Versions

18/07 2018

dev-master

9999999-dev http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz

18/07 2018

1.0.4

1.0.4.0 http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz

09/08 2017

1.0.3

1.0.3.0 http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz

26/07 2017

1.0.2

1.0.2.0 http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz

20/07 2017

1.0.1

1.0.1.0 http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz

20/07 2017

1.0.0

1.0.0.0 http://grabania.pl

eWUÚ integration for Laravel

  Sources   Download

MIT

The Requires

 

laravel pesel ewus nfz