Difference between revisions of "NATS4 Affiliate Account Postbacks"

From TMM Wiki
Jump to navigationJump to search
Line 29: Line 29:
 
[[Category:NATS4 Configuration Admin]]
 
[[Category:NATS4 Configuration Admin]]
  
== Signup Postback Format ==
+
== Account Signup Postback Format ==
  
 
Here is an exmaple log of the POST_ACCOUNT_SIGNUP:
 
Here is an exmaple log of the POST_ACCOUNT_SIGNUP:

Revision as of 12:54, 24 July 2015

NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
NATS Configuration Admin
The Configuration Admin
Log Admin Activity
IP Address Filtering
MEMBER_EXPIRE_PAD
SKIP COUNTRIES
Fraud Configuration
Email Configuration
Affiliate Signup Email
Affiliate Postback
Affiliate Postback NEW
Affiliate Analytics
Throttling
NATS4 Terms of Service feature
GeoIP2

NATS4 has to ability to post information to a script of your choice for new affiliate signups as well as affiliate account changes. These postbacks can be enabled from the Configuration admin. For other postback examples, please check this article: NATS4 Postbacks and Post URLs

Configuration Admin

If you would like to enable these postbacks, go to the Configuration Admin and select "Postback" from the Current Section drop-down menu. You will then see the following configurations under the "Affiliate Account Postback" sub-section

  • POST_ACCOUNT_SIGNUP - Receive a postback when a new affiliate signs up.
  • POST_ACCOUNT_CHANGES - Receive a postback when an existing affiliate updates their account information.

Postback Logging Script

The following example script allows you to log the contents of a postback

NOTE: Make sure that the log is NOT in a web accessible folder.

<?php

	$file = '/path/to/nats4/logs/postback_logs.txt';
	// Open the file to get existing content
	$post = print_r($_REQUEST, TRUE);
	file_put_contents($file, $post, FILE_APPEND);
 
?>

Account Signup Postback Format

Here is an exmaple log of the POST_ACCOUNT_SIGNUP:

Array
(
    [loginid] => 77
    [username] => afftest72
    [deleted] => 0
    [type] => 0
    [skinid] => 102
    [payvia_type_id] => 1
    [status] => 0
    [join_date] => 1437757101
    [inhouse] => 0
    [tmmid] => 0
    [origin] => 0
    [payout_period_id] => 0
    [firstname] => nick
    [lastname] => test
    [email] => afftest72@gmail.com
    [date_posted] => 1437757101
    [join_ip] => 168430111
    [reviewed] => 0
    [minimum_payout] => 50
    [bonus] => 0
    [bonus_used] => 0
    [unencoded] => 0
    [startpage] => internal.php
    [rep_baseline] => 0
    [company] => tmm
    [url] => AFFTEST.COM
    [icq] => 1234512345
    [aim] => afftest
    [address1] => 123+address
    [address2] => addresscont
    [city] => testcity
    [state] => nj
    [country] => US
    [zip_code] => 12345
    [invoicer] => 0
    [req_docs] => 0
    [w9] => 0
    [mailok] => 1
    [trust_level] => 0
    [new_notification] => 0
    [latest_news] => 0
    [default_campaign] => 0
    [default_program] => 0
    [default_site] => 0
    [pv_instant] => 0
    [payout_approval] => 0
    [access_preset] => 0
    [custom1] => 0
    [custom2] => 0
    [custom3] => 0
    [custom4] => 0
    [custom5] => 0
    [remote_access] => 0
    [remote_payment] => 0
    [remote_adtool] => 0
    [allow_subscription_passthrough] => 0
    [allow_option_force] => 0
    [Address] => 123+address
    [Address_2] => addresscont
    [City] => testcity
    [Country] => United States
    [Pay_To] => nopay
    [State] => nj
    [Zip_Code] => 12345
)

Account Changes Postback Format

NATS will postback the loginid, and only the fields that have changed for your affiliate. Here is an exmaple log from the POST_ACCOUNT_CHANGES postback when changing first name, last name, address, and city for loginid 3:

Array
(
    [firstname] => testname
    [lastname] => testlast
    [address1] => 123+test
    [city] => testcity
    [loginid] => 3
)