Nethram
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2017
06:37 AM
Roku scene graph Channelstore - How to get transaction id of a purchased item ?
I have a beta channel and two " in channel products" and I can successfully subscribe channel products.
subscription.xml
subscription.brs
I want to log purchaseId after a successful subscription.
How can I get purchased Id using product id from content node "m.billing.orderStatus ". ?
subscription.xml
<ChannelStore id="billing"/>
subscription.brs
[size=100]sub init()[/size]
m.billing.ObserveField("orderStatus", "On_billing_purchaseResult")
end sub
sub On_billing_purchaseResult()
if m.billing.orderStatus = invalid OR m.billing.orderStatus.status = invalid then
?"invalid purchase"
return
end if
if m.billing.orderStatus.status = 1 then
? "Purchased RESULT : " ; m.billing.orderStatus
end if
end sub
I want to log purchaseId after a successful subscription.
How can I get purchased Id using product id from content node "m.billing.orderStatus ". ?
2 REPLIES 2
Valeriia
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2018
03:01 AM
Re: Roku scene graph Channelstore - How to get transaction id of a purchased item ?
I use roChannelStoreEvent.
kartigas
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018
07:22 AM
Re: Roku scene graph Channelstore - How to get transaction id of a purchased item ?
Hi Nethram
you can use event like param received of sub
you can use event like param received of sub
sub On_billing_purchaseResult(event)
if event.getData().status = invalid
?"invalid purchase"
return
end if
item = event.getData().GetChild(0)
? item " <-- check this ITEM PUCHASED "
if event.getData().status = 1
? "Purchased RESULT : " ; event.getData().status
end if
end sub