Very simple client for InterFax SOAP API
Very simple client for InterFax SOAP API. For the moment it supports only sending simple text faxes and sending faxes with file attachment. It's easily extensible to add other InterFax methods., (*1)
Via Composer, (*2)
``` bash $ composer require iivannov/interfax, (*3)
## Usage ``` bash $interfax = new InterFax($username, $password); //send a text $message to the given $number $interfax->sendText($number, $message); //send a fax with file attachment to the given $number $interfax->sendFile($number, $filePath, $fileType);
If you are using Laravel, the package contains a Service Provider and a Facade for you., (*4)
config\app.php
``` php 'providers' => [ ... Iivannov\Interfax\Support\InterFaxServiceProvider::class, ];, (*5)
'aliases' => [ ... 'Interfax' => Iivannov\Interfax\Support\Facade\InterFax::class ];, (*6)
2. Then you need to add your username and password in `config\services.php` ``` php 'interfax' => [ 'username' => YOUR_INTERFAX_USERNAME, 'password' => YOUR_INTERFAX_PASSWORD ]
``` php //send a text $message to the given $number Interfax::sendText($number, $message);, (*7)
//send a fax with file attachment to the given $number Iterfax::sendFile($number, $filePath, $fileType);, (*8)
```, (*9)