trialPay.show()

类型 函数
返回值
修订 版本 2024.3703
关键词 广告, advertising, TrialPay, show
另请参阅 trialPay.init()
trialPay.*

概述

显示 TrialPay 广告。

语法

trialPay.show( eventName )
eventName (必填)

字符串. 与您在 TrialPay 控制面板 中创建的事件名称匹配的广告事件名称。

示例

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" } )