2017 © Pedro Peláez
 

library emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

image

wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  • Thursday, June 21, 2018
  • by ebidtech
  • Repository
  • 4 Watchers
  • 1 Stars
  • 1,035 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 18 Versions
  • 22 % Grown

The README.md

Emailbidding SDK

This SDK serves to help Emailbiddings's publishers to integrate their systems with Emailbidding platform., (*1)

Requirements

You'll need to be install on your server the PHP 5.4 version or higher and add the package 'wondeotec/emailbidding-sdk' to you composer dependencies., (*2)

Webhooks

If you are an Emailbidding publisher, then you can subscribe an endpoint and listen Emailbidding's events such as unsubscriptions, soft bounces, hard bounces, clicks or even opens., (*3)

This SDK helps you on testing your test to be able to receive an webhook event. Emailbidding system always send an HTTP POST request to the given endpoint with an JSON object on body identical to the following:, (*4)

{
  "ip_address":"127.0.0.1",
  "action":"unsubscription",
  "campaign_id":6368,
  "list_external_id":"my_list",
  "reason":"user_request",
  "recipient_email_address":"email@domain.com",
  "hash":"8d4ba2b6fc195d3f95039377ac7208e6",
  "recipient_external_id":"5556664",
  "trigger_date":"2015-09-03 11:13:34",
  "type":"unsubscription"
}

This SDK provides you an object to send webhooks to your endpoint in the same way as the Emailbidding system will send to you on the production environment., (*5)

The object 'EB\SDK\Webhook\Webhook' has a single method that accepts a payload and and endpoint. You can create an object of type 'EB\SDK\Webhook\Payload', or you just can 'ask' to 'EB\SDK\Webhook\Payload' to create an simple object to you. See the following example:, (*6)

<?php

(...)
use EB\SDK\Webhook\PayloadFactory;
use EB\SDK\Webhook\Webhook;
(...)

$webhook = new Webhook();
$success = $webhook->post(
    PayloadFactory::createOpen('email@domain.com', 'my_list'),
    'https://your.secure.server/endpoint'
));

Recipient subscribe

Emailbidding recipient subscribe API allow you to upload your database to Emailbidding platform. You have to distinct methods to submit your recipients: simple and anonymous integration. This SDK helps you on the integration providing you an 'EB\SDK\RecipientSubscribe\RecipientSubscribe' object that you can instantiate with 'EB\SDK\RecipientSubscribe\Recipient' objects and then you just need to post the recipients data to Emailbidding. Take the following example in consideration:, (*7)

<?php
(...)
use EB\SDK\RecipientSubscribe\RecipientSubscribe;
use EB\SDK\RecipientSubscribe\RecipientFactory;
(...)

// ** RECIPIENT SUBSCRIBE ** //
// Creating a recipient subscribe object with my credentials
$recipientSubscribe = new RecipientSubscribe('YOUR_PUBLISHER_API_KEY', 'YOUR_PUBLISHER_API_SECRET');

// Posting an simple recipient (minimal information) to Emailbidding API and dumping the result
var_dump($recipientSubscribe->post(
    array(RecipientFactory::createSimpleRecipient('email@domain.com', 'FR')),
    YOUR_PUBLISHER_ID,
    'my_best_database'
));

// Posting an anonymous recipient to Emailbidding (NOTE: the email address WILL NOT be sent to Emailbidding)
// The email address 'email@domain.com' will be transformed in '7328fddefd53de471baeb6e2b764f78a'
var_dump($recipientSubscribe->post(
    array(RecipientFactory::createSimpleAnonymousRecipient('email@domain.com', 'FR')),
    YOUR_PUBLISHER_ID,
    'my_best_database'
));

Server to Server Submission

Emailbidding SDK allows you, as an advertiser, to submit your conversion to Emailbidding platform. In order to use this API you need to grab you advertiser EB API key and secret., (*8)

The Emailbidding S2S API accepts an HTTP POST with the following JSON as payload:, (*9)

{
    "conversion":{
    "subid":"123456",
    "description":"Test conversion",
    "details":{
        "conversion_date":"1970-01-01",
        "revenue":1.23,
        "total_conversions":1,
        "ip_address":"127.0.0.1",
        "conversion_type":"click",
        "link_position":1
    }
  }
}

Below, you will find a snippet of PHP code that show you how to send conversion data using Emailbidding conversion API., (*10)

<?php

(...)

// Set your credentials
$apiKey       = 'YOUR_API_KEY';
$apiSecret    = 'YOUR_API_SECRET';
$advertiserId = 'YOUR_ADVERTISER_ID';

// Set your conversion details
$conversionDetails = new Details(1.23, new \DateTime(), 1);
$conversion        = new Conversion('123456', 'Test conversion', $conversionDetails);

// Submit your conversion
$conversionSubmit  = new ConversionSubmit($advertiserId, $apiKey, $apiSecret);
$conversionSubmit->post($conversion);

For more examples you can clone the following project from github: https://github.com/wondeotec/sample-emailbidding-sdk, (*11)

The Versions

21/06 2018

dev-master

9999999-dev http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

21/06 2018

v1.3.1

1.3.1.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

08/06 2018

v1.2.2

1.2.2.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

05/06 2018

v1.2.1

1.2.1.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

10/04 2018

dev-eb-1745-emailbidding-api-documentation

dev-eb-1745-emailbidding-api-documentation http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

14/09 2017

v1.2

1.2.0.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

22/12 2016

v1.0.3

1.0.3.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

21/11 2016

v1.0.2

1.0.2.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

21/11 2016

v1.0.1

1.0.1.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

21/11 2016

v1.0.0

1.0.0.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

04/05 2016

dev-op-358-add-publisher-suppression-api-to-sdk

dev-op-358-add-publisher-suppression-api-to-sdk http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

20/01 2016

v0.3.0

0.3.0.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

15/12 2015

v0.3.1-RC

0.3.1.0-RC http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

14/12 2015

v0.3.0-RC

0.3.0.0-RC http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

16/10 2015

v0.2.2

0.2.2.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

14/10 2015

v0.2.1

0.2.1.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

08/10 2015

v0.2

0.2.0.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding

06/10 2015

v0.1

0.1.0.0 http://github.com/wondeotec/emailbidding-sdk

Collection of scripts to allow interactions with Emailbidding API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Wondeotec SA

api php sdk emailbidding