Skip to content

Commit 9039763

Browse files
Treats Student plan as paid if payment source is on file
1 parent e21fc78 commit 9039763

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/plus/gk/models/checkin.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface GKLicense {
2525
readonly organizationId: string | undefined;
2626
readonly reactivationCount?: number;
2727
readonly nextOptInDate?: string;
28+
readonly hasPaymentSource?: boolean;
2829
}
2930

3031
export type GKLicenseType =

src/plus/gk/utils/checkin.utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export function getSubscriptionFromCheckIn(
2525
// if there are any paid licenses with status of in_trial, move them to effectiveLicenses
2626
for (let i = 0; i < paidLicenses.length; i++) {
2727
const [, license] = paidLicenses[i];
28-
if (license.latestStatus === 'in_trial' || license.latestStatus === 'trial') {
28+
if (
29+
(license.latestStatus === 'in_trial' || license.latestStatus === 'trial') &&
30+
license.hasPaymentSource !== true
31+
) {
2932
effectiveLicenses.push(paidLicenses.splice(i, 1)[0]);
3033
i--;
3134
}

0 commit comments

Comments
 (0)