dblock / slack-strava

(Re)Post Strava activities to Slack
https://slava.playplay.io
MIT License
37 stars 6 forks source link

Expired subscriptions can't be reactivated #155

Closed anbugge closed 7 months ago

anbugge commented 10 months ago

I got a message about my subscription being expired, probably as a result of the recent commit. (Seems like I haven't paid since I first subscribed years ago, so no problem there).

But I can't reactivate the subscription. When I try to "Pay $9.99 by card", I just get a message "Customer Already Registered".

dblock commented 10 months ago

Let's take this offline, emailing you.

dblock commented 10 months ago

There's a bug with the reactivation, reopening as such.

brunofracalossi commented 9 months ago

+1 facing this bug to renew a subscritpion

dblock commented 9 months ago

@brunofracalossi email me and I'll fix it by hand, dblock at vestris dot com

dblock commented 8 months ago

This will also happen if your subscription expired. If anyone is facing this issue with a hosted bot on playplay.io, please email me dblock at vestris dot com.

Fixing manually.

  1. Re-create the subscription in Stripe.
  2. Update team and check.
    team = Team.where(...)
    team.active = true
    team.subscribed = true
    team.save!
    subscription_info = []
    if team.stripe_subcriptions&.any?
    subscription_info << team.stripe_customer_text
    subscription_info.concat(team.stripe_customer_subscriptions_info)
    subscription_info.concat(team.stripe_customer_invoices_info)
    subscription_info.concat(team.stripe_customer_sources_info)
    subscription_info << team.update_cc_text
    elsif team.subscribed && team.subscribed_at
    subscription_info << team.subscriber_text
    else
    subscription_info << team.trial_message
    end
    puts subscription_info.join("\n")
  3. Restart the bot.
dblock commented 7 months ago

Fixed in https://github.com/dblock/slack-strava/commit/475cff185f3f364885ea97d7377cc5969afd7d95.