gnikyt / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
1.24k stars 374 forks source link

Cannot Get Billing to Show During Install #366

Closed davidgrzyb closed 4 years ago

davidgrzyb commented 4 years ago

I can't seem to get billing to show during install. I have:

I've used this exact SQL to create a plan: INSERT INTO `plans` (`type`, `name`, `price`, `capped_amount`, `terms`, `trial_days`, `test`, `on_install`) VALUES (1, 'Default Plan', 30.00, 30.00, 'Demo terms', 7, false, true);

I'm using the provided Shop model, no extending. I have tried custom and public apps thinking I can't test billing on a public app without approval. No luck.

Seems like each shop is created without a plan_id, despite having a plan with on_install set to true. This is probably something I'm overlooking, any help is greatly appreciated.

davidgrzyb commented 4 years ago

Found the issue, make sure you add the billable middleware to your routes!

As mentioned in the docs, the Billable middleware is what will force a user to the billing page. Make sure to also have a plan with on_install set to true :)