Were you able to figure this out? I seem to be having the same issue. Thanks!
Issue with Spark Team Billing without trial
I have found that it is impossible for a user to register if I only have team plans, no free plan, and no trial days.
Here is my SparkServiceProvider booted method:
''' public function booted() { Spark::useStripe();
Spark::teamPlan('Startup', 'test-startup')
->price(49)
->maxTeams(1)
->features([
'First', 'Second', 'Third'
]);
Spark::teamPlan('Small Business', 'test-smallbusiness')
->price(69)
->maxTeams(1)
->features([
'First', 'Second', 'Third'
]);
Spark::teamPlan('Enterprise', 'test-enterprise')
->price(89)
->maxTeams(1)
->features([
'First', 'Second', 'Third'
]);
}
'''
When I go to the registration page, there are no plans visible, just the standard registration form. When I try to register, it fails because there is no plan selected. In the console, I get:
''' Uncaught TypeError: Cannot read property 'price' of null '''
''' if (!Spark.cardUpFront || this.selectedPlan.price == 0) { return this.sendRegistration(); } '''
It looks like app.js is trying to read the price of the selected plan, but no plans appear so there cannot be a selected plan. Is this a bug or am I missing something? Why do teamPlans not show when a user is trying to register?
Please or to participate in this conversation.