File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
components/server/ee/src/workspace Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1718,15 +1718,16 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
1718
1718
1719
1719
try {
1720
1720
const allTS = await this . teamSubscriptionDB . findTeamSubscriptionsForUser ( user . id , new Date ( ) . toISOString ( ) ) ;
1721
- if ( ! allTS . find ( ( ts ) => ts . id === teamSubscriptionId ) ) {
1721
+ const ts = allTS . find ( ( ts ) => ts . id === teamSubscriptionId ) ;
1722
+ if ( ! ts ) {
1722
1723
log . error ( { userId : user . id } , "Cannot cancel: unknown Team Subscription (legacy)" , {
1723
1724
teamSubscriptionId,
1724
1725
} ) ;
1725
1726
return ;
1726
1727
}
1727
1728
1728
1729
await this . chargebeeService . cancelSubscription (
1729
- teamSubscriptionId ,
1730
+ ts . paymentReference ,
1730
1731
{ } ,
1731
1732
{
1732
1733
teamSubscriptionId,
@@ -2648,7 +2649,7 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
2648
2649
continue ;
2649
2650
}
2650
2651
const url = switchToPAYG
2651
- ? `/switch-to-payg?teamSubscription2=${ ownedTeamSubscription2 . id } `
2652
+ ? `/switch-to-payg?teamSubscription2=${ team . id } ` /** yes, team.id */
2652
2653
: "https://www.gitpod.io/docs/configure/billing#configure-organization-billing" ;
2653
2654
result . unshift ( {
2654
2655
message : `Your '${ plan . name } ' subscription for Organization '${ team . name } ' will be discontinued on March, 31st.` ,
You can’t perform that action at this time.
0 commit comments