ITNS (Instant Transaction Notification Service)


ITNS Einrichten

Das System der affilicon erlaubt dir als Vendor per Instant Transaction Notification Service (ITNS) in Echtzeit Informationen über erfolgreiche Verkäufe und andere Transaktionen wie z.B. Rückgaben vollautomatisch zu empfangen und zu verarbeiten.

Der Service bietet dir eine Anbindungslösung für jedes beliebige System an, welches POST-Aufrufe verarbeiten kann. Wir bieten bereits fertige und leicht zu konfigurierende Anbindungen wie bekannte E-Mail-Marketing Systeme z. B. CleverReach, GetResponse, Klick-Tipp und AWeber, Membership-Verwaltungssysteme wie z.B. Digimember oder ContentPower und Kundenmanagement-Tools wie z.B. Infusionsoft oder ONTRAPORT an. Diese Anbindungen können in wenigen Schritten im My-Bereich im Reiter "Anbindungen" aktiviert werden.


Möchtest du jedoch selbstgeschriebene Skripte oder bisher nicht integrierte Systeme wie z.B. iContact ansteuern, so ist unsere klassische ITNS-Anbindung das Mittel der Wahl.

Rating

Header
Header

ITNS-URL

Trage hier deine URL ein, hinter der das Skript liegt, welches wir ansprechen sollen.

Wir schicken dir hiermit eine Information an dein eigenes System, das eine von dir ausgewählte Aktion auslösen kann: z.B. Mitgliederzugänge erstellen, bei Rückgabe und Chargeback sperren, Kunden in Newsletter eintragen.

Secret key

Trage hier einen Geheimschlüssel ein. Die Eingabe ist freiwillig.

Der "Secret key" (Geheimschlüssel) signiert das Telegramm, damit deutlich ist, dass es von uns kommt.

Präfix

Hier kannst du einen Präfix eingeben.
Du kannst dieses Feld auch frei lassen.

Wähle für den Präfix Buchstaben und Zahlen.
Für Clickbank erstellte Software kannst du meist mitbenutzen, wenn du bei Präfix ein "c" einträgst.

Einrichtung auf Seiten Deines Servers

Um die Daten dann auf deinem Server entgegennehmen zu können, benötigst du dort ein POST-fähiges Skript welches z.B. in PHP, Perl oder Ruby erstellt werden kann.

Die Rückmeldung an dein System nach erfolgreicher Bezahlung oder Erstattung erfolgt durch uns mittels eines POST-Aufrufes an die von dir hinterlegte URL, welche typischerweise wie folgt aussieht:

http://www.yourserver.com/abcd/yourscript.php 

Das Skript, welches auf Seiten deines Servers die Daten entgegen nimmt und auswertet, könnte dann beispielsweise wie folgt aussehen:

i

<?php

class AffiliConItnsVerification {
// this key needs to be changed depending on the configured prefix in the ITNS configuration
private CONST VERIFY_KEY = 'verify';

/**
* @param $postBag
* @param string $secretKey
* @return string|null
*/
public static function verify($postBag, string $secretKey)
{
if (is_array($postBag)) {
if (!array_key_exists(self::VERIFY_KEY, $postBag)) {
// the verify key is not present in our post payload, abort verification process
return null;
}

ksort($postBag);

$verification = "";
foreach ($postBag as $key => $value) {
if ($value !== null && $key !== self::VERIFY_KEY) {
$verification .= $value . '|';
}
}
$verification .= $secretKey;

return strtoupper(substr(sha1($verification), 0, 8));
}

return null;
}
}

// my_secret_key is the secret configured in the AffiliCon My-Area
// validate, if postbag was not tampered with
// you can skip the verification, if you have no secret key configured
$valid = AffiliConItnsVerification::verify($_POST, 'my_secret_key') === $_POST['verify'];
if ($valid === false) {
// add logging, exception handling etc. depends on the specific use case
return;
}

$empfaenger = $_POST['custemail'];
$betreff = 'Danke!';
$nachricht = 'Hallo ' . $_POST['custfullname'] . ', danke, dass Sie mein Produkt gekauft haben!';
$header = 'From: test@test.de';

// send example mail. this could be whatever your custom logic is, e.g. a membership or newsletter entry
mail($empfaenger, $betreff, $nachricht, $header);

Neben den von unserem System direkt unterstützten Variablen kannst du zudem auch über die Verwendung des GET-Parameters "custom" eigene Informationen über den Kunden oder Kauf wie z.B. eine Kundennummer oder ein 'tag' beim Bestelllink mit übergeben, den wir 1:1 per ITNS dann wieder zurückmelden.

Ein Aufruf unseres Kauflinks sähe dann beispielhaft wie folgt aus:

http://secure.affilibank.de/affilicon/start/product/1707/?custom=12345AbC

oder

http://secure.affilibank.de/affilicon/index?product=1707&custom=12345AbC

Unterstützte Variablen

VARIABLE

ERKLÄRUNG

aboend ;

Only for Abo cancelations “CANCEL-REBILL”: end date of Abonnement (e.g. 2013-04-03)

aboid ;

Only for Abonnements: Abonnement-ID

accountammount ;

Amount paid to party receiving notification (in cent (1000 = €10.00)) 3-10 Characters

billno ;

Count of the recurring payment. Default 1 for standard payments.

cart ID ;

Cart id for the transaction if cart widget is used

currency

Customer’s payment currency 3 Characters

custaddr1 ;

* Customer’s shipping address: field 1 0-255 Characters

custaddr2 ;

* Customer’s shipping address: field 2 0-255 Characters

custcc ;

* Customer country code 0-2 Characters

custcity ;

* Customer’s shipping address: City 0-255 Characters

custemail ;

Customer email 1-255 Characters

custfirstname ;

Customer’s first name 0-255 Characters

custfullname ;

Customer’s full name 1-510 Characters

custlastname ;

Customer’s last name 0-255 Characters

custom

Individual customer parameter. Could be set in your payform (e.g. ?custom=1234)

custphone ;

Customer phonel 1-255 Characters

custshippingcountry ;

* Customer’s shipping address: Country 0-255 Characters

custshippingzip ;

* Customer’s shipping address: Zip

custshipto ;

* Customer’s shipto name: 0-255 Characters

custzip ;

* Customer zip

data1 ;

First Subid Tracking Param (parameter used in the url for tracking affiliates)

data2 ;

Second Subid Tracking Param (parameter used in the url for tracking affiliates)

noticeversion ;

Version of the Classical ITNS

orderamount ;

Order total amount (in cent (1000 = €10.00)) 3-10 Characters

orderlanguage ;

The language code (0-2 characters) used in the orderform/checkoutform

prodid ;

Affilicon vendor product id 1-5 Characters (is send in the message and is documented).
→ Use prodtype to distinguish between standard and recurring products.

proditem ;

Old article id used for compatibility reasons

prodtitle ;

Title of product at time of purchase 0-255 Characters

prodtype ;

Type of product on transaction (STANDARD or RECURRING) 8-11 Characters

rfndreceipt ;

Only for RFND and CGBK: AffiliBank refund receipt number 8-13 Characters

shippingamount ;

Shipping costs amount (in cent (1000 = €10.00)) 3-10 Characters

subid;

First Subid Tracking Param (data1 paramater)

taxamount ;

Tax amount (in cent (1000 = € (10.00)) 3-10 Characters

tranreceipt ;

AffiliBank receipt number 8-13 Characters

transaction;

Action taken 4-15 Characters:* SALE The purchase of a standard product or the initial purchase of recurring billing product.

* RFND The refunding of a standard or recurring billing product. Recurring billing products that are refunded also result in a “CANCEL-REBILL” action.

* CGBK A chargeback for a standard or recurring product.

* R-SALE Recurring Payment (Ratenzahlung / installment)

* BILL Recurring Payment (Abonnement)

transaffiliate ;

Affiliate on transaction 0-10 Characters

transpaymentmethod ;

Method of payment by customer 0-4 Characters:
* VISA – VISA
* MSTR – MasterCard
* ELV – Lastschrift Deutschland
* IBAN – EU-Lastschrift
* WIRE – Überweisung
* PYPL - PayPal
* SFRT - Sofortüberweisung
* TEST - Testkauf

String 'UNKN' * UNKN - means unknow payment method

transrole ;

String 'VENDOR' (Length=6

transtime ;

The Unix Epoch time the transaction occurred 10 Characters

transvendor ;

Vendor on transaction 5-10 Characters

verify ;

Used to verify the validity of the previous fields 8 Characters

i

Wir prüfen beim Aufruf einer SSL-Zieldomain (https), ob ein gültiges Zertifikat vorliegt. Falls du mit SSL arbeitest, muss dein Zertifikat gültig sein.