Roku Developer Program

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

push notification failure?

We are not receiving any type of notification.  We've enabled it in our web api screen of the developer account.
To be certain we aren't getting anything, the file it points to simply writes a "1" to a database table.  When calling the link in a browser it works and a 1 is written - but when we do a sale or any billing transaction nothing is written to our database.

// API access key from Roku API's Console

// Retrieve the request's body and parse it as JSON

//generate required response ASAP to prevent further push notification attempts

//create response array using the response key from above

//set up required headers for response 
'ApiKey: ' .$ApiKey,
'accept: application/json',
'Content-Type: application/json'

//connect to database
$con=@new mysqli($sitename,$masteraccessname,$masteraccesspw,$databasename);
if (mysqli_connect_errno())
exit("Unable to connect to database.");

//create temp zzz table
// $sql="create table zzz(text varchar(4096))";
// $res=mysqli_query($con, $sql);
$sql="insert into zzz(text) values('1')";
$res=mysqli_query($con, $sql);

//send response body
echo json_encode($fields);
//end of required response

Why isn't roku sending notifications when we told it to?
0 Kudos