Jump to content
Android Forum - A Community For Android Users and Enthusiasts

How to set up a postback script to communicate with an app?


erman
 Share

Recommended Posts

Can anyone help me?How can i setup postback service for android?

I want setup Everbadge's offerwall via postback.

 

 

Here is some documation about it but i cant setup it can anyone help me?

 

Offer Wall Use

 

Grab your Offer Wall url below & assign it to an action that will load the Offer Wall URL within the device default browser or a WebView. (Important: If using within a WebView, please make sure the offers are redirecting users to the default browser.)

 

Parameters to pass in

 

sub_id : How to get the id on Android How to get the id on iOS How to get the id on Windows Phone

 

currency : Your Key

 

source : Optional "source" parameter allows publisher to group and filter statistics in reports. Standard alpha numeric characters can only be used and must be less than 255 characters.

 

aff_sub2 : Optional "aff_sub2" parameter allows publisher to pass in their own value or identifier. Standard alpha numeric characters can only be used and must be less than 255 characters.

 

Your Offer Wall URL

Optional Filters

If you would like to exclude certain types of offers you can do so by passing in the following parameters when you call your offer wall URL.

&apps_only=1 : This will exclude all web based offers.

&market_only=1 : (Android Only) This will exclude all app offers that do not redirect the user to install the app from Google Play.

 

 

Postback Details | Test PostBack URL

 

On successful conversions while using this currency we will POSTBACK to your server athttp://Yoursite.com/postback.php with the following parameters:

sub_id (Android: device id, iOS: MAC Address, Windows Mobile: device id)

amount

verifier

source

aff_sub2

 

Parameter Details:

 

sub_id : The sub_id parameter you will pass into the Offer Wall url.

 

amount : The amount of new currency that should be added to your user's account.

 

verifier : The verifier is computed by taking the MD5 hash of the sub_id, amount and secret_currency_key (shown below), separated by colons. Your server should recompute the verifier and make sure the requests match.

 

PHP Example:

 

$amount = $_REQUEST['amount'];

$sub_id = $_REQUEST['sub_id'];

$verifier = $_REQUEST['verifier'];

 

$mysig = md5($sub_id . ':' . $amount . ':' . $secret_currency_key);

 

if($mysig == $verifier){

//reward your user

}

 

Your secret_currency_key is:

 

 

 

More on MD5 Hash

In PHP, md5($sub_id . ":" . $amount . ":" . $secret_currency_key)

In Ruby, Digest::MD5.hexdigest("#{sub_id}:#{amount}:#{secre t_currency_key}")

In C#, See this article, make sure to include the colons.

 

Virtual Currency Details

 

Name: Your Wall Name

Rate: 100.00. $1.00 USD = 100.00 of your virtual currency.

secret_currency_key:Your Key

 

 

 

Optional IP addresses to whitelist for postback

 

US East Tracking IPs

174.129.30.101

50.16.235.30

75.101.156.191

107.20.179.12

107.20.179.123

107.20.180.129

US West Tracking IPs

205.186.134.152

205.186.129.214

50.18.109.195

50.18.126.93

204.236.132.58

50.18.155.149

50.18.156.67

50.18.156.78

 

Europe Tracking IPs

79.125.116.52

79.125.110.249

46.51.190.241

46.51.183.234

46.137.109.19

46.137.87.162

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...