Glench / ExtPay

The JavaScript library for ExtensionPay.com — payments for your browser extensions, no server needed.
https://extensionpay.com
Other
524 stars 66 forks source link

Cancelled user has user.paid = true #159

Closed bilalsattar24 closed 1 year ago

bilalsattar24 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: (Assuming you are already a "paid" user using the developer email address on file.

  1. Open payment page
  2. Set status to cancelled (or any other unpaid option)
  3. Check user.paid
  4. It's still set to true.

Expected behavior I would expect user.paid to return false.

Screenshots Please see that the user is "cancelled" on the payment page but user.paid is still set to true.

Screenshot 2023-08-07 at 11 29 39 AM

Desktop (please complete the following information):

Additional context Additionally, is there a way to "sign out" of the current user? Once signing in via the payment page, I don't see a way to log out or change the user.

bilalsattar24 commented 1 year ago

12 days and no response?

Irishman25 commented 1 year ago

Agreed. That's not a good look. I was about to integrate into a new extension but user above has a valid and critical callout that I don't see attention on. Is this still repo still active?

Glench commented 1 year ago

Thanks for the report and the notification bump! I was on vacation (the one I take per year) and I'm now looking through issues reported during that time. I haven't reproduced it yet, but if this is indeed a real issue then it likely only happens in test mode. We'll take a look shortly.

Irishman25 commented 1 year ago

Awesome. Thanks for the quick follow up. This is a much needed source, I appreciate the hard work

bsattar24 commented 1 year ago

Thank you @Glench

Please don't hesitate to reach out if there's any more information I can provide.

Glench commented 1 year ago

I'm not able to reproduce this issue — it works exactly as expected when testing with a minimal example. Are you printing out user information directly from extpay.getUser()? Are you printing it out from a background page or from the chrome popup or from a content script?

bilalsattar24 commented 1 year ago

@Glench Thank you for taking a lot. I've spent some time trying to reproduce it again this morning, but it seems to be working as expected now.

I can switch between the statuses and the user object reflects that. In the screenshot, I was printing that output directly from extpay.getUser(). I did call it from the function from a content script in the screenshot above.

Glench commented 1 year ago

Hm ok, well if you can't reproduce it either then I'll close this for now. If you do end up finding an issue feel free to comment on it and I can reopen.