LimeDeck / nova-cashier-overview

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

Fix fetching of cashier customer model #28

Closed reppair closed 2 years ago

reppair commented 2 years ago

Properly fetch the customer model via Cashier::$customerModel instead from config (config option is deprecated for Cashier 13).

Not sure if anything else needs refactoring for complete support, but that fixes my error in Nova.

Guess it closes #26 and #27

reppair commented 2 years ago

Here is the complete upgrade guide for Cashier 13.

If you need anything else updated just let me know or create a feature branch for the upgrade and we can all create PRs to it instead of directly to master.

Cheers!

PS not sure what is wrong with in StyleCI tbh :)

reppair commented 2 years ago

@HRcc what do you think?

rudowastaken commented 2 years ago

Hey @reppair, thanks for the PR! StyleCI was just complaining about spaces, it's resolved now 👍

If you need anything else updated just let me know or create a feature branch for the upgrade and we can all create PRs to it instead of directly to master.

Unfortunately, I'm not using this package in production at the moment, so it's been quite neglected and I'm also not familiar with the v13 update. However, there's an upcoming Nova 4 release which will likely require some tweaks. If that's something you're interested in tackling, you're very much welcome.

--

To push through this PR, there's one more thing I noticed in the docs:

Additionally, to fully migrate away from the "Plans" terminology, the stripe_plan columns on the subscriptions and subscription_items tables have been renamed to stripe_price. You will need to write a migration to rename these columns

This might need some update possibly with a fallback, right? https://github.com/LimeDeck/nova-cashier-overview/blob/master/src/Http/Controllers/DatabaseSubscriptionsController.php#L45

reppair commented 2 years ago

I'll add the migration and run test this weekend.

About Nova v4, lets first see the upgrade guide and what needs to be done. I might do that as well if it is not too much of a trouble to go over. :)

reppair commented 2 years ago

I'll add the migration and run test this weekend.

Was quite busy this weekend, hope I can do it this week or weekend.

luigel commented 2 years ago

@HRcc @reppair I added a PR for laravel nova 4. https://github.com/LimeDeck/nova-cashier-overview/pull/29

reppair commented 2 years ago

Nice! I still have to update mine for the current version though. Maybe today.

rudowastaken commented 2 years ago

Thank you @reppair! Let's get it merged.