Type Function Return value none Revision 2017.3060 Keywords ads, advertising, TrialPay, init See also trialPay.show() trialPay.*
trialPay.init()
initializes the TrialPay plugin.
Once initialized, you can show an ad using trialPay.show().
trialPay.init( adListener, params )
Listener. Listener function that will receive adsRequest events.
Table. Table containing TrialPay initialization values — see the next section for details.
The params
table includes parameters for TrialPay initialization.
String. Your TrialPay app key, obtained from the TrialPay dashboard.
String. The ID for the current user of your app. This must be an alphanumeric string that is 2 to 150 characters long and it must not begin with 0
.
local trialPay = require( "plugin.trialPay" ) local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) end end -- Initialize the TrialPay plugin trialPay.init( adListener, { appKey="YOUR_APP_KEY", sid="user1" } )