User subscription status update not updating in test mode
FlashInThePan opened this issue · 4 comments
Describe the bug
I start off with an Paid subscription status in test, then I go to the payment page and change my status to "Unpaid". I then click on my extension icon, and my popup.js, which uses the extpay.getUser() function retrieves my user details my paid status is true:
However, I then go to the payment page I can see that my payment status is "Unpaid".
To Reproduce
- Open payment form in test mode.
- Change status from active to unpaid.
- Reopen extension by clicking on extension icon.
- View console output of user output from extpay.getUser() executed un popup.js. This shows that the paid=true (which is not correct).
- Re-open payment page from extension. You will see user status is correctly set to Unpaid.
Desktop (please complete the following information):
OS: Windows 10 Pro
Chrome browser version: 111.0.5563.65 (Official Build) (64-bit)
If you look in the docs you’ll see that “unpaid” refers to their stripe subscription status (meaning that they’ve paid before but in this billing cycle have not). Look at the stripe docs for more info about Subscription.status.
Hi Glen. Thanks for getting back to me so quickly.
In that case, how do I know whether or not to show premium features if paid=true doesn't tell me this? Even when I make myself active, I don't see any additional info from the user object to say whether or not show premium features if paid=true doesn't say whether they are active in the current billing cycle. I launch in 7 days, so I would super appreciate your help with this.
Thanks in advance.
There should be a subscriptionStatus field on the user object.
Think this was my fault.. I reduced the trial period in my logic to zero to test the trial period process and it sent my code down the wrong code path. Thanks for your time today.