swap stripe subscription

This commit is contained in:
Čarodej
2022-03-04 18:51:06 +01:00
parent ad5b741feb
commit ae138bb4d4
4 changed files with 5 additions and 6 deletions

File diff suppressed because one or more lines are too long

2
public/js/main.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -130,11 +130,9 @@ export default {
},
payByStripe() {
axios
.post('/api/stripe/checkout', {
planCode: this.selectedPlan.data.meta.driver_plan_id.stripe,
})
.post(`/api/subscriptions/swap/${this.selectedPlan.data.id}`)
.then((response) => {
window.location = response.data.url
console.log(response);
})
},
payByPaystack() {

View File

@@ -26,6 +26,7 @@ class SubscriptionEventSubscriber
public function handleSubscriptionWasExpired($event)
{
// TODO: set default team members
$event->subscription->user->limitations()->update([
'max_storage_amount' => get_settings('default_max_storage_amount') ?? 5,
'max_team_members' => 5,