Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sandeepthakur
Binge Watcher

Billing usage was specified on the Monetization channel properties page but no bright script code

I am getting below error, when I publish our channel/package. I am trying to re-submit my existing package after fixing some bugs. It is already published channel before bit now after fixing bugs , I am trying re-publishing. Please check below mentioned errors and help us publishing our channel/package.

 

"Billing usage was specified on the Monetization channel properties page but no billing related BrightScript code was found in your channel."

0 Kudos
8 REPLIES 8
necrotek
Roku Guru

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

In the dev portal select the channel with the problem. At the top next to "manage my channel" drop down select "Monetization". Un-check the  box next to items you are not using or select I am not monetizing my channel.

0 Kudos
sandeepthakur
Binge Watcher

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

I have not changed anything here regarding below error:

"Billing usage was specified on the Monetization channel properties page but no billing related BrightScript code was found in your channel."

 

Now, I  have only fixed some other video related bug.  And I also want to clarify that it is already published channel. It is  not brand new channel we are publishing. So dont know why I am getting this error now.

We don't process any kind of payment on roku platform , we do that on our  third party web app.  here on roku , we just allow him play video on roku platform for his subscription , which purchased on  third party web app. 

 

0 Kudos
necrotek
Roku Guru

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

Having already been published has no bearing on the error It could have still been present previously and was published anyway. Did you check the "monetization" properties for this channel? If the static analysis reports it as a "warning", it will likely not block you from publishing. Try publishing anyway.  If your channel is rejected then we can look at other options.  I usually have the opposite warning., "Billing code found in code but not specified in channel properties (From code reuse and not bothering to remove it.) Channel still passes certification and published.

0 Kudos
sandeepthakur
Binge Watcher

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

"Billing usage was specified on the Monetization channel properties page but no bright script cod"

I am getting this error and it blocking re-publishing channel.  Not getting how can I resolve it.

0 Kudos
necrotek
Roku Guru

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

can you confirm that this is how your channel is set up. This is the only place to set billing options.Roku_monitization.png

0 Kudos
developer_uj24
Binge Watcher

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

My problem is I'm using payment gate way and code on my BRS file for payments used "Store" object for that, but the same error is occurring. Yes I do implemented the payments in my code so why it can't detect my code?Capture.PNG 

0 Kudos
renojim
Community Streaming Expert

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

It's been a while, but I vaguely remember having this problem.  I think there were certain key objects you had to reference to make static analysis happy.  roChannelStoreEvent comes to mind, so make sure you're checking that an event/message is an roChannelStoreEvent and not just assuming that it is.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
hamza061
Binge Watcher

Re: Billing usage was specified on the Monetization channel properties page but no bright script cod

Our channel contains in-channel one-time purchases. we have implemented code for Roku pay in our app, and tested it via side loading and by pushing it to beta channel.
Issue is that the static analysis throws error every time that says:

"According to the Monetization channel properties page, your channel is offering in-channel purchases, but no Roku Pay BrightScript code was found in your channel."

I have got code help from https://github.com/rokudev/channelstore-node-tvod-sample. We also tested this repo app by packaging this repo and uploading package to my beta channel that also shows same error. we are getting late due to this issue. So kindly help us with this problem solving so we can publish our app asap.

here is code of payment that we are using

function CheckSubscriptionAndStartGame(order_title as string, order_identifier as string, order_price as string)

    m.order_title = order_title
    m.order_identifier = order_identifier
    m.order_price = order_price

    ' m.global.store = createObject("roSGNode", "channelStore")

    m.global.store.observeField("requestPartnerOrderStatus", "requestPartnerOrderStatusChanged")
    m.global.store.observeField("confirmPartnerOrderStatus", "confirmPartnerOrderStatusChanged")

    m.global.store.command = "getUserData"
    m.global.store.observefield("userData", "on_user_data")

    print ">> Getting Products (Catalog and Purchases)"

    m.global.store.ObserveField("catalog", "On_billing_catalog")

    ' m.global.store.command = "getStoreCatalog"
    ' m.global.store.observefield("storeCatalog", "OnStoreCatalog")

end function


sub On_billing_catalog()
    if m.global.store.catalog = invalid OR m.global.store.catalog.status = invalid then
        print "false"
        return
    end if

    if m.global.store.catalog.status = 1 then
        print "calling onPurchaseStart > " m.global.store.catalog.getChild(0)
        onPurchaseStart()
    else
        print "false"
    end if

end sub


sub on_user_data()
   
    ?" user Data > " m.global.store.userData
    if m.global.store.userData <> invalid

        m.global.store.command = "getCatalog"

    end if
end sub

function onPurchaseStart() as void

    print "Calling makePurchase()"
    makePurchase()
end function

function statusDialogButtonSelected() as void
    m.dialog.close = true
end function

function ShowPurchaseStatus(params as object) as void
    msg = "Your purchase of " + params.title + " for " + params.priceDisplay
    if (params.status = 1)
        msg = msg + " succeeded!"
    else
        msg = msg + " failed"
    end if
    m.dialog = createObject("RoSGNode", "Dialog")
    m.dialog.title = m.order_title + "Purchase Status"
    m.dialog.message = msg
    m.buttons = ["OK"]
    m.dialog.buttons = m.buttons

    m.dialog.observeField("buttonSelected", "statusDialogButtonSelected")

    m.top.dialog = m.dialog

end function

sub makePurchase()
    m.orderInfo = createObject("roSGNode", "contentNode")
    m.orderInfo.priceDisplay = m.order_price
    m.orderInfo.price = m.order_price
    m.orderInfo.addField("code", "string", false)
    m.orderInfo.code = m.order_identifier

    m.global.store.requestPartnerOrder = m.orderInfo
    m.global.store.command = "requestPartnerOrder"
end sub

sub requestPartnerOrderStatusChanged()
    ? "RequestPartnerOrderStatusChanged "; m.global.store.requestPartnerOrderStatus

    if m.global.store.requestPartnerOrderStatus.status = "Success"
        print "valid"
        confirmPurchase()
    else
        print "invalid"
        displayOrderStatusDialog(m.global.store.requestPartnerOrderStatus)
    end if
end sub

sub confirmPurchase()
    m.confirmRequest = CreateObject("roSGNode", "ContentNode")
    m.confirmRequest.title = m.order_title
    m.confirmRequest.priceDisplay = m.order_price
    m.confirmRequest.price = Mid(m.global.store.requestPartnerOrderStatus.total, 2)
    m.confirmRequest.orderID = m.global.store.requestPartnerOrderStatus.orderID

    m.confirmRequest.addField("code", "string", false)
    m.confirmRequest.code = m.order_identifier

    m.global.store.confirmPartnerOrder = m.confirmRequest

    ? "Issuing ConfirmPartnerOrder Command"
    ? "-- code: ", m.global.store.confirmPartnerOrder.code
    ? "-- title: ", m.global.store.confirmPartnerOrder.title
    ? "-- priceDisplay: ", m.global.store.confirmPartnerOrder.priceDisplay
    ? "-- price: ", m.global.store.confirmPartnerOrder.price
    ? "-- orderID: ", m.global.store.confirmPartnerOrder.orderID
    ? "-- contentKey : ", m.global.store.confirmPartnerOrder.contentKey
    m.global.store.command = "confirmPartnerOrder"
end sub

sub confirmPartnerOrderStatusChanged()
    ? "ConfirmPartnerOrderStatusChanged "; m.global.store.confirmPartnerOrderStatus

    displayOrderStatusDialog(m.global.store.confirmPartnerOrderStatus)
end sub

function orderStatusDialogButtonSelected()
    if m.top.dialog.buttonSelected = 0
        m.top.dialog.close = true
    else
        print "cancel button pressed"
    end if
end function

function displayOrderStatusDialog(response as object) as void
    dialog = CreateObject("roSGNode", "Dialog")
    dialog.title = "Order Status"

    dialog.buttons = ["OK"]

    message = "Your purchase of " + m.order_title
    if response <> invalid and response.status = "Success"
        message = message + " for " + m.global.store.requestPartnerOrderStatus.total
        message = message + " succeeded"
    else
        message = message + " failed"
    end if

    dialog.message = message

    dialog.observeField("buttonSelected", "orderStatusDialogButtonSelected")

    ? "SHOWING ORDER STATUS DIALOG WITH MESSAGE: "; message
    m.top.dialog = dialog
end function



0 Kudos