kooljay68
13 years agoVisitor
Will This Work ???
in the showFeeds.brs I created:
then on the appDetailScreen.brs I am trying to do the following: but does not seem to be quite right yet ? Any ideas?
Thanks for the help all
item.cost = strtoi(item.cost)
item.modelId = strtoi(item.modelId)
m.cost = item.cost
m.model = item.modelId
then on the appDetailScreen.brs I am trying to do the following: but does not seem to be quite right yet ? Any ideas?
else if msg.isButtonPressed()
print "ButtonPressed"
print "ButtonPressed"
if msg.GetIndex() = 1
if m.cost = 25 then
funds = tokenValidation()
if funds = 1 then
exit while
else
chargeCustomer()
end if
end if
PlayStart = RegRead(showList[showIndex].ContentId)
if PlayStart <> invalid then
showList[showIndex].PlayStart = PlayStart.ToInt()
endif
Function tokenValidation() As Integer
sn = GetDeviceESN()
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://allbabestv.com/mcams/roku/getCredits.php?deviceID=" + sn)
response = xfer.GetToString()
xml = CreateObject("roXMLElement")
if xml.Parse(response)
if (strtoi(xml.tokens) > item.cost)
return 0
end if
end if
return 1
end Function
Function chargeCustomer()
sn = GetDeviceESN()
xfer = CreateObject("roURLTransfer")
xfer.SetURL("http://allbabestv.com/mcams/roku/chargeCustomer.php?deviceID=" + sn + "&cost=" + m.cost + "&model=" + m.model)
response = xfer.GetToString()
end Function
Thanks for the help all