Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lifetime payment option and manage|subscription button routing #331

Closed
wants to merge 2 commits into from

Conversation

anthony-som
Copy link

@anthony-som anthony-som commented Apr 17, 2024

Description: Added/Fix Lifetime option

  • type BillingInterval contained 'lifetime' option when stripe does not offer a 'lifetime' interval.

Solution

  • worked around this issue by creating a one-time payment option on the product which would have a 'null' interval value on the database. Work with this to set the 'lifetime' value to null

Result

Database value:
image
Result:
image

Description: Add route to price button

  • Manage button for subscribed users would route them to another subscription payment link

Solution:

  • added condition to onClick; if user is subscribed, manage button routes them to /account page where they can access customer portal

Copy link

vercel bot commented Apr 17, 2024

@anthony-som is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

@anthony-som anthony-som marked this pull request as ready for review April 17, 2024 01:05
@anthony-som anthony-som changed the title Added/Fix Lifetime option Fix lifetime payment option and manage|subscription button routing Apr 17, 2024
@leerob
Copy link
Member

leerob commented Jun 7, 2024

Hey! Good suggestion. While we aren't going to merge this into the main template, you can definitely use it for your fork 😄

@leerob leerob closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants