This commit is contained in:
Andras Bacsai
2023-08-24 17:41:11 +02:00
parent 6f14e127a3
commit 9ef3218bb5
5 changed files with 20 additions and 14 deletions

View File

@@ -44,9 +44,6 @@ class PricingPlans extends Component
'price' => $priceId,
'quantity' => 1,
]],
'customer_update' =>[
'name' => 'auto'
],
'tax_id_collection' => [
'enabled' => true,
],
@@ -57,6 +54,9 @@ class PricingPlans extends Component
$customer = currentTeam()->subscription?->stripe_customer_id ?? null;
if ($customer) {
$payload['customer'] = $customer;
$payload['customer_update'] = [
'name' => 'auto'
];
} else {
$payload['customer_email'] = auth()->user()->email;
}

View File

@@ -15,8 +15,8 @@ class IsBoardingFlow
*/
public function handle(Request $request, Closure $next): Response
{
ray('IsBoardingFlow Middleware');
if (showBoarding() && !in_array($request->path(), allowedPaths())) {
// ray('IsBoardingFlow Middleware');
if (showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
return redirect('boarding');
}
return $next($request);

View File

@@ -27,7 +27,7 @@ class SubscriptionValid
}
if (!isSubscriptionActive() && !isSubscriptionOnGracePeriod()) {
// ray('SubscriptionValid Middleware');
if (!in_array($request->path(), allowedPaths())) {
if (!in_array($request->path(), allowedPathsForUnsubscribedAccounts())) {
return redirect('subscription');
} else {
return $next($request);