PHPackages                             arttiger/laravel-cpa - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. arttiger/laravel-cpa

ActiveLibrary[API Development](/categories/api)

arttiger/laravel-cpa
====================

Laravel CPA (Cost Per Action) network integration package

v1.0.5(3y ago)1561MITPHP

Since Sep 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/arttiger/laravel-cpa)[ Packagist](https://packagist.org/packages/arttiger/laravel-cpa)[ Docs](https://github.com/arttiger/laravel-cpa)[ RSS](/packages/arttiger-laravel-cpa/feed)WikiDiscussions dev Synced 3d ago

READMEChangelog (5)Dependencies (6)Versions (8)Used By (0)

 [![Laravel CPA Network Integration](logo.png)](logo.png)

 [![StyleCI Status](https://camo.githubusercontent.com/a5ba4d50d87b65d9f669044256a7d4e4f5756ccff55ba129df9c93a5817efdd9/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3430323032333832372f736869656c643f7374796c653d666c6174)](https://github.styleci.io/repos/402023827) [![Total Downloads](https://camo.githubusercontent.com/bff7c0898da06f760c7410b6a4bf822b3c0f74af7e77ca198000249413196482/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61727474696765722f6c61726176656c2d6370613f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-cpa) [![Latest Stable Version](https://camo.githubusercontent.com/c83b64ddb415a1777fe9a49bfb03c5b3ad0f05d767d0cbe8ad5e589315e859a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61727474696765722f6c61726176656c2d6370613f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-cpa) [![License](https://camo.githubusercontent.com/475e7f04f6fdc5427134e11d008eaf3148a914e55f1fa4bc21f25f8e7d2397c6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61727474696765722f6c61726176656c2d6370613f7374796c653d666c6174)](https://packagist.org/packages/arttiger/laravel-cpa)

Laravel Package for [CPA](https://en.wikipedia.org/wiki/Cost_per_action) networks integration and target customer actions registration in your application. Currently supported: [Admitad](https://www.admitad.com/ru/), [Credy](https://www.adcredy.com/), [DoAffiliate](https://www.doaffiliate.net/), [Finline](https://finline.ua/), [LeadGid](https://leadgid.eu/), [Leads.su](https://leads.su/), [PapaKarlo](https://papakarlo.com/), [Sales Doubler](https://www.salesdoubler.com.ua/), [Storm Digital](https://stormdigital.io/), [Loangate](https://loangate.network/), Appscorp, [PAP](https://squidleads.com/), [GoodAff](https://www.goodaff.com/), [LetMeAds](https://letmeads.com/), [GuruLeads](https://www.guruleads.ru/), Nolimit.

Installation
------------

[](#installation)

Install the package via composer:

```
$ composer require arttiger/laravel-cpa
```

Next, you need to run migrations:

```
$ php artisan migrate
```

For Laravel 5.4 and below it necessary to register the service provider

### Configuration

[](#configuration)

In order to edit the default configuration you may execute:

```
php artisan vendor:publish --provider="Arttiger\Cpa\CpaServiceProvider"

```

After that, `config/cpa.php` will be created.

### Environment

[](#environment)

This package can be configured by environment variables out-of-box:

- **SALES\_DOUBLER\_ID** - personal id for request to SalesDoubler
- **SALES\_DOUBLER\_TOKEN** - token for request URI for SalesDoubler
- **STORM\_DIGITAL\_GOAL** - (default: 1), goal in URL for StormDigital
- **STORM\_DIGITAL\_SECURE** - secure in URL for StormDigital
- **PAPA\_KARLO\_TYPE** - ('offer' or 'goal') postback type for PapaKarlo
- **PAPA\_KARLO\_OFFER** - (default: 35) personal offer id for PapaKarlo
- **PAPA\_KARLO\_GOAL** - (default: 75) personal goal id for PapaKarlo
- **PDL\_PROFIT\_OFFER** - ID of the advertiser in the PDL-Profit system
- **DO\_AFFILIATE\_PATH** - path for DoAffiliate API (example: pozichka-ua in )
- **LEADS\_SU\_TOKEN** - token for LeadsSu
- **ADMITAD\_POSTBACK\_KEY** - postback request authentication key, constant string 32 char
- **ADMITAD\_CAMPAIGN\_CODE** - AdmitAd defined campaign code, constant string 10 char
- **ADMITAD\_ACTION\_CODE** - target action code, get it from AdmitAd
- **CREDY\_OFFER** - offer code, get it from Credy
- **LET\_ME\_ADS\_PATH** - path for LetMeAds API (example: api/v1.1/y7r/dcfgs1tg:awvv47ghn1jv1f$am/get/postback.json)
- **GURU\_LEADS\_PATH** - path for GuruLeads API (example: postback)
- **CLICK2MONEY\_PATH** - path for Click2Money API (example: cpaCallback)
- **NOLIMIT\_PATH** - path for Nolimit API (example: postback)

If one of key for some CPA network not set postback requests for this network will not be done.

### Register Middleware

[](#register-middleware)

You may register the package middleware in the `app/Http/Kernel.php` file:

```
