Clicking Message on a developer profile currently navigates to developers/:id/messages/new. Instead, if the user doesn't have an active Business Subscription then they should be redirected to a Stripe Checkout page. If the user isn't signed in then redirect to users/sign_up. If the user doesn't have a business profile then they should be redirected to businesses/new.
The redirects should remember which developer the business wants to message. This can be done with Devise's #stored_location_for. All of this logic can live in ColdMessagesController for now as a user progresses through the steps.
The Stripe Checkout page should offer a single annual subscription for $99 per month. Upon successful charge, Stripe should redirect via success_url back to the remembered URL (messaging the developer).
Also, a webhook should be caught to create the Customer record with Stripe's identifier and the subscription status. The webhook should also listen for changed and failed events to ensure the database is kept up to date with active subscription records in Stripe.
Clicking Message on a developer profile currently navigates to
developers/:id/messages/new. Instead, if the user doesn't have an active Business Subscription then they should be redirected to a Stripe Checkout page. If the user isn't signed in then redirect tousers/sign_up. If the user doesn't have a business profile then they should be redirected tobusinesses/new.The redirects should remember which developer the business wants to message. This can be done with Devise's
#stored_location_for. All of this logic can live inColdMessagesControllerfor now as a user progresses through the steps.The Stripe Checkout page should offer a single annual subscription for $99 per month. Upon successful charge, Stripe should redirect via
success_urlback to the remembered URL (messaging the developer).Also, a webhook should be caught to create the
Customerrecord with Stripe's identifier and the subscription status. The webhook should also listen for changed and failed events to ensure the database is kept up to date with active subscription records in Stripe.https://stripe.com/docs/billing/subscriptions/build-subscription?ui=checkout
Open source considerations
The text was updated successfully, but these errors were encountered: