Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

Roku TVOD channel transaction errors:

HI There,

I have added the TVOD Channel Template example in my code which working fine in my local device in developer mode testing but when i publish it to Non-certified or Public it is not working ,like when do start the payemnt transaction process , it start with progress dialog and then just goes to errorstarting of the transactionstarting of the transactionand without roku pay page , this comes with errorand without roku pay page , this comes with error dialog. i am adding mycodes for your reference below:

 

sub makePurchase()

m.pdialogCheckSubs.title = "Processing.."
m.top.getScene().dialog = m.pdialogCheckSubs


m.pdialogCheckSubs = CreateObject("roSGNode", "ProgressDialog")
m.orderRequest = CreateObject("roSGNode", "ContentNode")
m.orderRequest.title = "example title"
m.orderRequest.priceDisplay = "1.99"
m.orderRequest.price = "1.99"

m.orderRequest.addField("code", "string", false)
m.orderRequest.code = "The Room (Purchase)"

m.store.requestPartnerOrder = m.orderRequest

? "Issuing RequestPartnerOrder Command"
? "-- code: ", m.store.requestPartnerOrder.code
? "-- priceDisplay: ", m.store.requestPartnerOrder.priceDisplay
? "-- price: ", m.store.requestPartnerOrder.price
m.store.command = "requestPartnerOrder"
end sub

 

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

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

m.store.confirmPartnerOrder = m.confirmRequest

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

function displayOrderStatusDialog(response as Object) as Void
m.pdialogCheckSubs = CreateObject("roSGNode", "ProgressDialog")

m.dialog = CreateObject("roSGNode", "Dialog")
m.dialog.title = "Order Status"
m.dialog.optionsDialog = true

m.dialog.buttons = ["OK"]
m.succes = false
m.message = "Your purchase of " + m.orderRequest.title
? "m.store.requestPartnerOrderStatus: "; m.store.requestPartnerOrderStatus
if response <> invalid and response.status = "Success"
m.PaymentUpdatingTask = CreateObject("roSGNode", "PaymentUpdatingTask")
? "response.purchaseId:"; response.purchaseId

m.message = m.message + " for " + m.store.requestPartnerOrderStatus.total

m.dialog.message = m.message

m.message = m.message + " succeeded"
m.succes = true


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

? "SHOWING ORDER STATUS DIALOG WITH MESSAGE: "; m.message
m.top.getScene().dialog = m.dialog


m.message = m.message + " succeeded"
m.succes = true
else
?"m.store.requestPartnerOrderStatus:";m.store.requestPartnerOrderStatus
m.message = m.message + " failed with errorMessage: "

if m.store.requestPartnerOrderStatus.errorMessage<>invalid then
m.message+=m.store.requestPartnerOrderStatus.errorMessage
end if
if m.store.requestPartnerOrderStatus.status<>invalid then
m.message+= " status: "+m.store.requestPartnerOrderStatus.status
end if
if m.store.requestPartnerOrderStatus.errorCode<>invalid then
m.message += " errorCode: "+m.store.requestPartnerOrderStatus.errorCode
end if


m.dialog.message = m.message
m.dialog.observeField("wasClosed", "orderStatusDialogButtonSelected")
m.dialog.observeField("buttonSelected", "orderStatusDialogButtonSelected")

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

 

 

 

0 Kudos
7 Replies
Highlighted
Level 10

Re: Roku TVOD channel transaction errors:

is you m.store only created once? it should have only one reference through out the life cycle.

0 Kudos
Highlighted
Level 7

Re: Roku TVOD channel transaction errors:

Yes, there is only one instance for whole life cycle for it I am using. The same issue happen with TVOD channel template from roku git example, when I deploy it in my roku account with my Roku channel product name the same issue happen.

0 Kudos
Highlighted
Level 10

Re: Roku TVOD channel transaction errors:

OK then I am not sure, just to make sure, yours is TVOD only channel and based on the Roku docs:

"Contact your partner manager to get the requestPartnerOrder and confirmPartnerOrder commands enabled for your channel." 

This is also done?

0 Kudos
Highlighted
Level 7

Re: Roku TVOD channel transaction errors:

Yes this is totally all with TVOD channel as Roku doc. But I didn't get about you as you said "Contact your partner manager to get the requestPartnerOrder and confirmPartnerOrder commands enabled for your channel." 

And I had created the product name with selecting my channel name for the product names in my roku account for product type like one time and consumable type. But It does not start the transaction except some error response as you can see my code. But one thing I would say. It's working fine when I set the testing product name "tvod-rental" from roku TVOD git example for testing purpose.

0 Kudos
Highlighted
Level 10

Re: Roku TVOD channel transaction errors:

Interesting, I am not sure why that is happening, but what I was referring to was the comment mentioned in the docs: https://developer.roku.com/docs/developer-program/roku-pay/tvod-channel.md#handling-transactional-pu...

May be Roku needs to enable those transaction for your channel/Roku dev account? So better to reach out to Partnersuccess to get some answers.

Please share when you get this resolved also.

0 Kudos
Highlighted
Level 7

Re: Roku TVOD channel transaction errors:

Sure, gomad

Will let you know after contacting with Partnersuccess.

0 Kudos
Highlighted
Level 7

Re: Roku TVOD channel transaction errors:

Hi Gomad, 

This issue is resolved now. My channel was private that was why Roku doesn't allow my TVOD feature enabled in my channel. But it working fine.

Now I am facing another issue whenever I do start the transaction and agreed to purchase it then always i get transaction failed popup dialog but this is working fine with successful transaction in RokuDev mode. Do you know why am i getting this so?

0 Kudos