messerli90/first_promoter

Laravel PHP Facade/Wrapper for First Promoter

v0.1 2018-05-21 16:48 UTC

This package is auto-updated.

Last update: 2024-11-29 00:10:13 UTC


README

Introduction

This packages provides a nice and easy wrapper around the FirstPromoter API for use in your Laravel application.

In order to use the FirstPromoter API, you must have an account and API keys.

Example


Installation

Add messerli90/first_promoter to your composer.json.

"messerli90/first_promoter": "~1.0"

or

composer require messerli90/first_promoter

Run composer update to pull down the latest version of the package.

Now open up app/config/app.php and add the service provider to your providers array.

'providers' => array(
    Messerli90\FirstPromoter\FirstPromoterServiceProvider::class,
)

Optionally, add the facade to your aliases array

'FirstPromoter' => \Messerli90\FirstPromoter\Facades\FirstPromoter::class,

Configuration

Add the first_promoter to your config/services.php array

'first_promoter' => [
    'key' => 'YOUR_API_KEY'
]

Usage

use Messerli90\FirstPromoter\FirstPromoter;

$first_promoter = new FirstPromoter(config('services.$first_promoter.key'));

Tracking API

// With this call you can track the referral signs-ups server-side.
$first_promoter->trackSignUp($wid, $email, $data = []);

Promoter


Reward


Lead


Format of returned data

The returned JSON data is decoded as a PHP object.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.