로딩중입니다
IGAW Reward Server Integration
6/27/2016 8:31:38 PM

IGAW Reward Server Integration

IGAW provides services that gives users rewards, such as adPOPcorn or Coupon Services.

IGAW Reward Server transfers the needed information for giving rewards to the callback server.

To receive and process the information for giving rewards, follow the following guide and create the callback server. 


Set the Basic Information

Enter the basic information of the server in the adPOPcorn admin page to receive the callback.

Below is the information to enter.

  • Server : Select the developer's own server
  • Callback URL : Live URL of the callback server which receives the Reward Giving Information.
  • Test Callback URL : Test URL of the callback server which receives the Reward Giving Information.
  • HTTP Request Method : Test URL of the callback server which receives the Reward Giving Information.
  • Reward Giving Information(*) : Parameter of needed information to give out rewards.

[Example]


(*)Reward Giving Information

You can register the parameter key values that will receive each reward parameter transferred by IGAW reward server.

adPOPcorn service supports additional parameters for more information.

    Additional Parameters (adPoPcorn)

  1. {campaign_name} : Campaign name that user participated in
  2. {campaign_type} : Campaign type that user participated in
  3. {app_key} : IGAWorks app key
  4. {app_name} : IGAWorks app name
  5. {time_stamp} : Time participated in the campaign
  6. {adid} : Google Advertising ID of the device that user participated with

Protocol Test

For your convenience, we support protocol test page.

Input the user id to test, then proceed with the 3 types of the protocol tests.

Press start button of each protocol test. The sample reward information will transfer to the test callback URL.



Callback Response

The Reward Giving Information that IGAWorks reward server transfers should be received and processed, then the result should be returned in JSON type as a response.

Return appropriate response that suits each case defined below to IGAWorks reward server.


JSON Response Format for Each Cases

  • Security Validation Failed
    {"Result":false,"ResultCode":1100,"ResultMsg":"invalid signed value"}
  • Reward Duplicate Transaction
    {"Result":false,"ResultCode":3100,"ResultMsg":"duplicate transaction"}
  • User Verification Failed
    {"Result":false,"ResultCode":3200,"ResultMsg":"invalid user "}
  • Exceptional Error Occurred
    {"Result":false,"ResultCode":4000,"ResultMsg":"custom error message"}
  • Reward Transaction Success
    {"Result":true,"ResultCode":1,"ResultMsg":"success"}


Case Details

Refer to the followings to find the right response format for the case.

  1. Security Validation 
    (*)SignedValue transferred and encrypted by the HMAC-MD5 method in the IGAWorks reward server, and the one created in the developer's server will be compared. It will be judged valid secure communication only when they match.

  2. Reward Duplicate Transaction Prevention
    It is a process to prevent the user to get rewards more than once from the same rewardKey
    .
    rewardkey will be issued when the user successfully completed the campaign. It is the unique value for all the campaigns.
    If rewardkey that was transferred has already given the rewards, reward should not be given.

  3. User Verification
    Verifying whether the user exists in the user information of the Reward Giving Information which was transferred from the IGAWorks rewards server.

    The reward should not be given when transferred user information is invalid.

  4. Exceptional Error Occurred
    Use when processing the exceptional errors not defined above. You can set the message for each situation by using ResultMsg(It must be in English).

  5. Reward Transaction Success
    Completing the reward giving process for the Reward Giving Information that passed all the errors above, and transferring the result to IGAWorks reward server.

(*)SignedValue : Encrypted string used in security validation. IGAWorks server includes SignedValue, which was created as plaintext including the default callback parameter value(usn,rewardkey,quantity,campaignkey), in the callback when it transfers. It will be compared with the SignedValue created in the same way in the developer's callback server.


Sample Codes (c#, php)

In the callback server, return the right response to each case to the IGAWorks reward server referring to the protocol interface defined above.

To help you with the callback server configuration, we support C#, PHP sample codes.

You can download the sample codes from the following link.

[IGAWorks Reward Server Sample Codes]