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

ActiveLibrary[API Development](/categories/api)

a1ex7/cpa
=========

Laravel CPA (Cost Per Action) network integration package

v1.0(6y ago)513MITPHPCI failing

Since Dec 25Pushed 6y ago2 watchersCompare

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

READMEChangelog (1)Dependencies (5)Versions (3)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/18f0f7961efb1ad6e37f89a424f943987bbc5b990f9656121b2696ee34333046/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61316578372f6370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/a1ex7/cpa)[![Total Downloads](https://camo.githubusercontent.com/db5239aaba9c0d1d5e4eec70f223826c40399fb453efed4e4d85fc56f42bf86c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61316578372f6370612e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/a1ex7/cpa)[![Build Status](https://camo.githubusercontent.com/73d35829d837cd60a5e2516987222de854602f38a264f256201c9ae2c331c354/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f61316578372f6370612f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/a1ex7/cpa)[![laravel cpa](logo_transparent.png)](logo_transparent.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.credy.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

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

[](#installation)

Install the package via composer:

```
$ composer require a1ex7/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="A1ex\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
- **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

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:

```
