Skip to content

fix(payments): Update buttons to navigate to appropriate pages#19881

Merged
xlisachan merged 1 commit intomainfrom
PAY-3455
Jan 14, 2026
Merged

fix(payments): Update buttons to navigate to appropriate pages#19881
xlisachan merged 1 commit intomainfrom
PAY-3455

Conversation

@xlisachan
Copy link
Copy Markdown
Contributor

This pull request

Navigate to appropriate pages from the Subscription Management page, per subscription:

  • Stay subscribed flow

    • If the customer is eligible for the churn coupon, the “Stay subscribed” button will navigate to /[locale]/subscriptions/[subscription_id]/loyalty-discount/stay-subscribed
    • If no churn coupon is available, the “Stay subscribed” button will navigate to /[locale]/subscriptions/[subscription_id]/stay-subscribed
  • Cancel subscription flow

    • If customer is eligible for churn coupon, the “Cancel subscription” will navigate to /[locale/subscriptions/[subscription_id]/loyalty-discount/cancel
    • If no churn coupon is available, but there is a cancel interstitial offer, the “Cancel subscription” button will navigate to /[locale]/subscriptions/[subscription_id]/offer
    • If no churn coupon or cancel interstitial offer is available, the “Cancel subscription” button will navigate to /[locale]/subscriptions/[subscription_id]/cancel

Issue that this pull request solves

Closes: PAY-3455

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.

@xlisachan xlisachan requested a review from a team as a code owner January 13, 2026 18:59
Copy link
Copy Markdown
Contributor

@StaberindeZA StaberindeZA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of small comments.


const cancelInterstitialOffer = offers.at(0);
if (!cancelInterstitialOffer) {
return undefined as unknown as CancelInterstitialOfferTransformed;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: undefined should not be cast to CancelInterstitialOfferTransformed

isEligibleforChurnStaySubscribed:
churnStaySubscribedEligibility.isEligible,
};
return await this.subscriptionManagementService.getStaySubscribedFlowContent(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: await isn't necessary here.

Navigate to appropriate pages from the Subscription Management page, per subscription:

    Stay subscribed flow
        If the customer is eligible for the churn coupon, the “Stay subscribed” button will navigate to /[locale]/subscriptions/[subscription_id]/loyalty-discount/stay-subscribed
        If no churn coupon is available, the “Stay subscribed” button will navigate to /[locale]/subscriptions/[subscription_id]/stay-subscribed

    Cancel subscription flow
        If customer is eligible for churn coupon, the “Cancel subscription” will navigate to /[locale/subscriptions/[subscription_id]/loyalty-discount/cancel
        If no churn coupon is available, but there is a cancel interstitial offer, the “Cancel subscription” button will navigate to /[locale]/subscriptions/[subscription_id]/offer
        If no churn coupon or cancel interstitial offer is available, the “Cancel subscription” button will navigate to /[locale]/subscriptions/[subscription_id]/cancel

Closes: PAY-3455
Copy link
Copy Markdown
Contributor

@StaberindeZA StaberindeZA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thank you for the changes.

@xlisachan xlisachan merged commit d73eeae into main Jan 14, 2026
20 checks passed
@xlisachan xlisachan deleted the PAY-3455 branch January 14, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants