Closed hugo4le closed 7 years ago
I followed the instructions and made some calls as below but i could not get the content of "status" to continue the work (I may have missed something). Can you show me how to get the status? Thanks
nonRenewing.onStatusChange(function(status) { if (status) { document.getElementsByClassName('status').innerHTML = 'isSubscribed: ' + status.subscriber + '\n' + 'expiryDate: ' + status.expiryDate + '\n'; } else { document.getElementsByClassName('status').innerHTML = 'Status is Unknown'; } });
OR: nonRenewing.getStatus(function(error, status) { if (error) { alert("Failed to load subscription status: " + error + " Please try again."); return; } document.getElementsByClassName('status').innerHTML = 'isSubscribed: ' + status.subscriber + '\n' + 'expiryDate: ' + status.expiryDate + '\n'; });
newbie..that's why i had basis question
I followed the instructions and made some calls as below but i could not get the content of "status" to continue the work (I may have missed something). Can you show me how to get the status? Thanks
OR: nonRenewing.getStatus(function(error, status) { if (error) { alert("Failed to load subscription status: " + error + " Please try again."); return; } document.getElementsByClassName('status').innerHTML = 'isSubscribed: ' + status.subscriber + '\n' + 'expiryDate: ' + status.expiryDate + '\n'; });