PHPackages                             artjoker/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. artjoker/cpa

ActiveLibrary

artjoker/cpa
============

Laravel CPA (Cost Per Action) network integration package

v5.0.1(10mo ago)33.6k2MITPHP

Since Jan 29Pushed 10mo ago4 watchersCompare

[ Source](https://github.com/artjoker/cpa)[ Packagist](https://packagist.org/packages/artjoker/cpa)[ Docs](https://github.com/artjoker/cpa)[ RSS](/packages/artjoker-cpa/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (50)Used By (0)

Laravel CPA Network Integration
===============================

[](#laravel-cpa-network-integration)

inspired by wearesho-team/bobra-cpa

[![Latest Version on Packagist](https://camo.githubusercontent.com/98c218e0c099c1fbdfb2016e690e6b1766fc27792f93d4d8ffa27782dec57e70/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172746a6f6b65722f6370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/artjoker/cpa)[![Total Downloads](https://camo.githubusercontent.com/df4036accbc2704a3431acbe67e0712f7b6c3fe20d02ff627e6c17f636f73f8d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172746a6f6b65722f6370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/artjoker/cpa)

[![laravel cpa](logo.png)](logo.png)

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, Loangate, Appscorp, PAP, GoodAff, LetMeAds, GuruLeads, Nolimit, MoneyGo, LeadLoan.

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

[](#installation)

Install the package via composer:

```
$ composer require artjoker/cpa
```

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="Artjoker\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)
- **MONEY\_GO\_PATH** - path for MoneyGo API (example: postback)
- **SD\_TOP\_ID** - personal id for request to SD\_Top
- **SD\_TOP\_TOKEN** - token for request URI for SD\_Top
- **LEAD\_LOAN\_PATH** - path for LeadLoan 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:

```
