Affiliate Account Postbacks
Article Topics: Sites, Affiliates
NATS 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 see 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
Please 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 example 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] => [email protected]
[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
[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
[affiliate_referral] => Array
(
[loginid] => 4
[username] => AccountRep1
)
[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
)Last updated
Was this helpful?