1. Download our Official Android App: Forums for Android!

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

Discussion in 'Android Development' started by token45, Jan 24, 2013.

  1. token45

    token45 Lurker
    Thread Starter
    Oct 22, 2012

    Oct 22, 2012
    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 at http://[COLOR="Red"]Yoursite[/COLOR].com/postback.php with the following parameters:
    sub_id (Android: device id, iOS: MAC Address, Windows Mobile: device id)

    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}:#{secret_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
    US West Tracking IPs

    Europe Tracking IPs


Share This Page