Looking to hire Laravel developers? Try LaraJobs

laravel-emarsys-connector maintained by qortex

Description
Proivdes Laravel wrapper for qortex/php-emarsys-connector package
Last update
2020/11/30 07:52 (dev-main)
Links
Downloads
7

Comments
comments powered by Disqus

Provides connection to Emarsys Omnichannel Customer Engagement Platform API v2

Install

$ composer require qortex/laravel-emarsys-connector
$ php artisan vendor:publish

Use

First, obtain credentials for Emarsys API User.

Then, use these credentials as username and secret in config/emarsys.php file or via environmental variables:

return [
    'username' => env('EMARSYS_USERNAME', ''),
    'secret' => env('EMARSYS_SECRET', ''),
];

Optionally, you can change Emarsys API url (which defaults to https://api.emarsys.net/api/v2/) if you are behing reverse proxy or something:

return [
    'username' => env('EMARSYS_USERNAME', ''),
    'secret' => env('EMARSYS_SECRET', ''),
    'apiUrl' => env('EMARSYS_API_URL', ''),
];

Then, get instance of EmarsysConnector from ConnectorService:

use Qortex\Emarsys\Services\Connector as EmarsysConnector;
use Qortex\Laravel\Emarsys\Services\ConnectorService as EmarsysConnectorService;

$emarsysConnector = new EmarsysConnectorService()->getConnector();

Finally you can use methods of the EmarsysConnector described in qortex/php-emarsys-connector package