You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some issues with "user.trialStartedAt" returning null. I use this script below and in the first instance it starts the trial and I confirm by email in test mode, but then when I reopen the extension it shows me the paid content instead of the trial content
extpay.getUser().then(user => {
if (!user.trialStartedAt && !user.paid){
//start trial
extpay.openTrialPage('7-day');
} else if (user.paid) {
if (user.trialStartedAt && (new Date() - user.trialStartedAt) < 1000*60*60*24*7){
// open trial content
let trialContent = document.getElementById('trialContent').content;
document.body.append(trialContent);
} else {
//open application
let paidContent = document.getElementById('paidContent').content;
document.body.append(paidContent);
document.body.append(user.trialStartedAt);
}
} else {
//ask for payment
extpay.openPaymentPage();
}
}).catch(err => {
document.querySelector('p').innerHTML = "Error fetching data :( Check that your ExtensionPay id is correct and you're connected to the internet"
})
EDIT:
it was giving my test email paid status instead of trial status, had to use a different email to test the trials
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm having some issues with "user.trialStartedAt" returning null. I use this script below and in the first instance it starts the trial and I confirm by email in test mode, but then when I reopen the extension it shows me the paid content instead of the trial content
EDIT:
it was giving my test email paid status instead of trial status, had to use a different email to test the trials
Beta Was this translation helpful? Give feedback.
All reactions