Skip to content

Handle User Status Trouble #192

Answered by Glench
connallykendrick asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @connallykendrick thanks for pointing this out. I believe it should be this instead :

    if (user.paid && !user.subscriptionCancelAt) {
        console.log("You're paid!")
    } else if (user.paid && user.subscriptionCancelAt) {
        console.log("Your subscription will end at the next billing cycle")
    } else if (user.subscriptionStatus === 'past_due') {
        console.log("You need to update your card!");
        extpay.openPaymentPage();
    } else if (user.subscriptionStatus === 'canceled') {
        console.log("We hope you enjoyed your subscription!")
    } else {
        console.log("You haven't paid yet :( ")
    }

I've updated this in the documentation.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@Glench
Comment options

Answer selected by connallykendrick
@connallykendrick
Comment options

@connallykendrick
Comment options

@Glench
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants