Unity Documentation

TuneTalk Direct Carrier Billing for Unity – TuneDCB
Software Development Kit Unity for Android

22nd April 2016
Forest Interactive Sdn. Bhd.
Andreas Ricardi

Document Version History

Version Number Version Date Revised By Description
1.0 02/10/2015 Andreas Ricardi First SDK
1.1 22/04/2016 Andreas Ricardi Accessible for TuneTalk User only.

Introduction

TuneDCB is a mobile payment option that lets users purchase and downloads digital contents inside android applications, and the payment is done by charging to users TuneTalk prepaid balance or to users TuneTalk postpaid bill. This TuneDCB is only applicable for TuneTalk Users and in Android apps only. TuneDCB Unity Plugin has been created and tested on Unity 5.3.3

Downloading the SDK

TuneDCB SDK can be downloaded from [HERE]. Inside the package will contains of two file that is:

  1. TuneDCB Unity Documentation V1.1 (Documentation)
  2. TuneDCB Unity Plugin V1.1 (The SDK)

SDK Setup

  1. Import the TuneDCB Package called: “TuneDCB Unity Plugin V1.1” package file. Assets -> Import Package -> Custom Package

  2. Select and Open the package.


  3. Click import and make sure all files are successfully imported prior to use the plugin.


Integrating TuneDCB

To integrate TuneDCB SDK into the android apps, developers are required to get AppsID and AppsSecret from TuneDCB developer portal at developer.tunedcb.com. Developer can proceed with the login if they are registered otherwise developers need to register themselves as new user. After successful login, users are required to:

  • Complete Profile Info
  • Register the Apps (Approval within 24hours)
  • Get AppsID and AppsSecret

To use the SDK, the developer need to:


  1. Drag TuneDCB prefab that is available in the prefab folder to the game scene/hierarchy


  2. Click on the TuneDCB game object that is available in the hierarchy . Under the inspector tab , key in Forest App ID & Forest App Secret key which you have obtained from TuneDCB portal .


  3. Attach TuneDCBPay Script to your respective button. Simply drag it to the Button or Add Component and type TuneDCBPay.


  4. Fill out your desire price and reward according to the button. Please refer the price points at the end of this section.


  5. Click on “+” on OnClick() section in the inspector.


  6. Drag the Button from the hierarchy to the “None (Object)” section.


  7. Select TuneDCBPay and choose TuneDcbPay().


  8. To setup the Reward, access TuneDCBPay script.

    Depending on the reward that has been set in the previous set up, you can use the IF statement which is available in “tunedcbReward” function. You will need to use the code for giving the reward. The Reward that has been setup has to be the same in the IF statement.


Price Points

Here are the ranges of available price points for TuneDCB:

Price Points Value in MYR
10 RM 0.10
20 RM 0.20
30 RM 0.30
40 RM 0.40
50 RM 0.50
60 RM 0.60
70 RM 0.70
80 RM 0.80
90 RM 0.90
100 RM 1.00
150 RM 1.50
200 RM 2.00
250 RM 2.50
300 RM 3.00
350 RM 3.50
400 RM 4.00
450 RM 4.50
500 RM 5.00
550 RM 5.50
600 RM 6.00
650 RM 6.50
700 RM 7.00
750 RM 7.50
800 RM 8.00
850 RM 8.50
900 RM 9.00
950 RM 9.50
1000 RM 10.00
1500 RM 15.00
2000 RM 20.00
3000 RM 30.00
4000 RM 40.00
5000 RM 50.00

 

Status Code

Below are the Status Code descriptions:

Status Code Description
OK Successful Transaction
else Failed Transaction