trialPay.show()

Type Function
Return value none
Revision 2017.3060
Keywords ads, advertising, TrialPay, show
See also trialPay.init()
trialPay.*

Overview

Shows a TrialPay ad.

Syntax

trialPay.show( eventName )
eventName (required)

String. The event name for the ad that matches the event name you created in the TrialPay dashboard.

Example

local trialPay = require( "plugin.trialPay" )

local function adListener( event )

    if ( event.phase == "init" ) then  -- Successful initialization
        -- Show an ad
        trialPay.show( "offerWall" )

    elseif ( event.phase == "failed" ) then  -- The ad failed to load
        print( event.type )
        print( event.isError )
    end
end

-- Initialize the TrialPay plugin
trialPay.init( adListener, { appKey="YOUR_APP_KEY", sid="user1" } )