GithubHelp home page GithubHelp logo

Comments (9)

mrandrewjbaker avatar mrandrewjbaker commented on June 14, 2024 1

Can you verify that users who have user.finished_onboarding? == true are able to view this, and not specific to unfinished users? I don’t believe # and %23 are the issue. 🤔

from speedrail.

ryanckulp avatar ryanckulp commented on June 14, 2024 1

closing this as i believe it was handled recently by e21ea85 and what i stated previously about clicking "Save" inside Stripe's UI (very dumb i know).

from speedrail.

stets avatar stets commented on June 14, 2024

Can you verify that users who have user.finished_onboarding? == true are able to view this, and not specific to unfinished users? I don’t believe # and ‘%23` are the issue. 🤔

Users who have user.finished_onboarding? == true hit the modify_subscription function:

They do redirect properly.

Something else odd is that navigating directly to the /billing_portal route directly works, but clicking the Manage button, which goes to the same route, gives the failed behavior above where stripe is hung up (and the URL does not have the section after the #)

from speedrail.

stets avatar stets commented on June 14, 2024

I'm thinking this behavior may be intended -- looks like the billing_portal route should only be requested with a POST not a GET like is happening when the user skips the onboarding flow. Maybe the manage button could be reworked as a form only if the user's onboarding status is false

from speedrail.

ryanckulp avatar ryanckulp commented on June 14, 2024

@stets thanks for digging!

  • everyone should be able to view Account page, in case they want to update their email/password
  • clicking /billing_portal link on account page should simply create a Checkout session vs BillingPortal session
  • the creation of a Checkout vs billing is handled by finished_onboarding? which will always be false if they have not done a successful Checkout (source)

from speedrail.

stets avatar stets commented on June 14, 2024

Thanks @ryanckulp -- that all makes sense

  • clicking /billing_portal link on account page should simply create a Checkout session vs BillingPortal session
    This step is where I'm observing the behavior where things break.

That user who has not finished onboarding, hits the begin_subscription function, which should redirect them to session.url, however the back half of that URL is getting chopped off and stripe will just get hung up

from speedrail.

ryanckulp avatar ryanckulp commented on June 14, 2024

@stets after further review, i think the page hangs because you don't yet have a subscription "set," which should be happening in a background job.

drop the delay inside user.delay.set_stripe_subscription, run back through onboarding (sign up, create subscription) and verify if that fixes things. i may need to tweak how the background jobs boot up.

from speedrail.

stets avatar stets commented on June 14, 2024

drop the delay inside user.delay.set_stripe_subscription, run back through onboarding (sign up, create subscription) and verify if that fixes things. I may need to tweak how the background jobs boot up.

Hmm, I gave that a try but still no luck. Keeping delay and removing delay from that func, I get the same results. The user is indeed getting a stripe customer id and it's being updated in the db too.

I think this has to due with some weirdness with redirects and handling that billing_portal route. Maybe it is because we are GETing it from the Account Page (breaks) but POSTing to it from the /subscribe page 🤔

btw I don't really need this to work, I can work around it. just want to point it out as an edge case that could be unreliable within Speedrail

from speedrail.

ryanckulp avatar ryanckulp commented on June 14, 2024

the routes file handles both GET and POST so thats fine. but page will hang when there is no attached customer id when the portal opens. can you confirm there is a customer id?

further you’ll need to just click “save changes” inside the Stripe UI > portal settings, kinda strange. this must be done 1x before it works, but your rails server should tell you that in the browser on localhost.

from speedrail.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.