로딩중입니다
Coupon Integration : Unity iOS
6/26/2016 6:22:54 PM

Coupon Service

Coupon Service is a reward program for users that input coupons published by the IGAW Coupon Service

For more information on Coupon Service, please go to the following link.

[Coupon Service Guide]


Notice
  1. IGAW General Integration must be set in order to integrate coupon add-on. [IGAW General Integration : Unity iOS]
  2. In order to integrate the coupon service, IgaworksUnityPlugin_iOS~*.unitypackage file must be included in Unity project. [SDK Installation : Unity]



Coupon API


Input User ID

User ID is a set of information to identify users who have completed the campaign and are eligible for a reward.

User ID must be set before the user inputs the coupon codes.

 

    Notice

  1. One user should only have one unique value, not variable.
  2. Must not contain any personal information(email, name, phone number, username).
  3. Must go through URL encoding if contains Korean, special character, or blank space.
  4. It should be set before the user enters the coupon codes.

Follow the above notice when input the User ID value.

IgaworksCorePluginIOS.SetUserId("player1001");


Coupon Display

A UI for users to input a coupon code is needed. Refer below to set up a coupon code input modal dialog.

  • Use Coupon SDK
  • Use your custom UI

You can use a UI provided by Coupon SDK or a customized UI. Integrate using the following steps for the appropriate UI.


Use Coupon SDK

Call up ShowCoupon API to display an input window.
void showCouponCheckBox(){
	IgaworksCouponPluginIOS.ShowCoupon();
}

Use Your Custom UI

CheckCoupon API should be called up to transmit the coupon code entered by a user parameter. The result will be returned accordingly.
Transmit the coupon code entered by a user in the "coupon code" in the example below as string.
void customCouponInputBox{
	IgaworksCouponPluginIOS.CheckCoupon("Coupon code");
}


Coupon Delegation

In the Coupon Service, delegation is available to define an additional action after a coupon is used.
To use coupon delegation provided by the plugin, the delegation should be registered as listed below.
public class MySampleScene : MonoBehaviour {

	// Use this for initialization
	void Start () {
		//Register delegate handler
	    	IgaworksCouponPluginIOS.IgaworksCouponSetCallbackHandler("MySampleScene");
// Register delegate IgaworksCouponPluginIOS.igaworksCouponValidationDidComplete += HandleIgaworksCouponValidationDidComplete; } // Implement delegate void HandleIgaworksCouponValidationDidComplete(string result){ //Proper action can be configured and performed when the use of coupon has been completed. string[] results = result.Split(','); Debug.Log ("IgaworksADSample : HandleIgaworksCouponValidationDidComplete " + results[0] + ", " + results[1]); } } }


IGAW Reward Server Integration

Note that IGAW reward server integration must be established to provide rewards to users who entered a coupon code.

In our Coupon Service, the reward server integration method is supported through our internal server.

Check the following link for more information on IGAW Reward Server integration.

[IGAW Reward Server Integration Guide]