LimeDeck / nova-cashier-overview

Interact with your Stripe subscriptions directly inside Nova.
MIT License
28 stars 18 forks source link

Manage Stripe Subscription for user without current subscription #5

Closed techdaddies-kevin closed 4 years ago

techdaddies-kevin commented 4 years ago

I am unable to manage the stripe subscription for a user who hasn't ever subscribed to a product.

For example:

Create a new user in Nova Go to the user view page Click Manage Stripe Subscription button

What happens: Stripe management interface never loads Console error is logged

vendor.js?id=fdec6f749c878e3a3065:1 TypeError: Cannot read property 'id' of null
    at a.fetchStripeSubscription (nova-cashier-overview:1)
    at It (vendor.js?id=fdec6f749c878e3a3065:1)
    at a.n (vendor.js?id=fdec6f749c878e3a3065:1)
    at It (vendor.js?id=fdec6f749c878e3a3065:1)
    at a.t.$emit (vendor.js?id=fdec6f749c878e3a3065:1)
    at click (nova-cashier-overview:1)
    at It (vendor.js?id=fdec6f749c878e3a3065:1)
    at HTMLButtonElement.n (vendor.js?id=fdec6f749c878e3a3065:1)
    at HTMLButtonElement.Zr.o._wrapper (vendor.js?id=fdec6f749c878e3a3065:1)
rudowastaken commented 4 years ago

Hi @techdaddies-kevin, thanks for pointing that out!. The button is hidden for non-existing subscriptions since the latest 2.0.0 release.

At the moment you can only manage existing subscriptions that were created previously (likely during the registration of your users) because of the complexity coming from creating a subscription in different use-cases.