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

Test Mode == Canceled -> user.paid == true #185

Closed philipmulcahy closed 7 months ago

philipmulcahy commented 10 months ago

Describe the bug I set my ExtPay test account to Cancelled on my subscription-based extension, but the extpay client calls continue to respond with paid == true.

To Reproduce

  1. Install "amazon order history reporter" chrome extension from chrome webstore.
  2. Open a tab to amazon.com (or amazon.co.uk, .de, .fr. .ca).
  3. Open the extension pop-up (orange A button).
  4. Log into preview/premium features via the preview features button, using test user.
  5. Set the user to have paid subscribed status.
  6. Refresh the tab.
  7. Open pop-up and see that there are no greyed out checkboxes on the extension's popup.
  8. re-open the extpay dialog and set the test user to cancelled state.
  9. refresh tab
  10. reopen extension popup.
  11. See paid features are still paid
  12. Open background page in debugger, and put breakpoint in ExtPay.module.js where user is fetched.
  13. Re-open extension popup (forces user to be fetched)
  14. See user.paid == true

Expected behavior Newly fetched user.paid should be false when. the test user's subscription is cancelled (?) It used to work like this and if it doesn't then what is test mode for?

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Here's the code I use to query ExtPay: https://github.com/philipmulcahy/azad/blob/9753074d7d18fb3da421b3c74ac05e5b6c69298c/src/js/extpay_client.ts The extension uses webpack.

Thank you!

Glench commented 9 months ago

Hey Philip, it's a lot of work for me to separate what your code is doing from what is actually going on with ExtensionPay. Would you be able to create a minimal example the demonstrates the problem you're seeing and doesn't have any of your own code? Maybe you could use the sample-extension-mv3 in this repo.

Glench commented 7 months ago

Hey Philip, any updates on your minimal repo? If not, I'll close this issue.

philipmulcahy commented 7 months ago

Sorry - not yet - I’ve been chasing down some other bugs that are more urgent, but this one is going to start hurting me soon, as we’re getting closer to the year boundary. Thanks for the chaser!

On 27 Mar 2024, at 20:41, Glen Chiacchieri @.***> wrote:

Hey Philip, any updates on your minimal repo? If not, I'll close this issue.

— Reply to this email directly, view it on GitHub https://github.com/Glench/ExtPay/issues/185#issuecomment-2023947709, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMXOHF66IFM5TAW3GFGNEDY2MVIJAVCNFSM6AAAAABBMDEKUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRTHE2DONZQHE. You are receiving this because you authored the thread.

Glench commented 7 months ago

OK, I'm going to close this until it can actually be verified. Feel free to comment when you have a minimal reproduction set up and I can re-open.