Introduction
This packages provides a nice and easy wrapper around the FirstPromoter API for use in your Laravel application., (*1)
In order to use the FirstPromoter API, you must have an account and API keys., (*2)
Example
Installation
Add messerli90/first_promoter
to your composer.json
., (*3)
"messerli90/first_promoter": "~1.0"
or, (*4)
composer require messerli90/first_promoter
Run composer update
to pull down the latest version of the package., (*5)
Now open up app/config/app.php
and add the service provider to your providers
array., (*6)
'providers' => array(
Messerli90\FirstPromoter\FirstPromoterServiceProvider::class,
)
Optionally, add the facade to your aliases
array, (*7)
'FirstPromoter' => \Messerli90\FirstPromoter\Facades\FirstPromoter::class,
Configuration
Add the first_promoter
to your config/services.php
array, (*8)
'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 = []);
Reward
Lead
The returned JSON data is decoded as a PHP object., (*9)
Contributing
Please see CONTRIBUTING for details., (*10)
Credits
License
The MIT License (MIT). Please see License File for more information., (*11)