Skip to content

Commit

Permalink
Merge pull request #13907 from mozilla/fxa-5658-wrong-upgrade-emails
Browse files Browse the repository at this point in the history
fix(subscriptions): wrong upgrade emails
  • Loading branch information
StaberindeZA authored Aug 9, 2022
2 parents 8d1f668 + 2b04aac commit d84af5e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/lib/payments/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2898,7 +2898,7 @@ export class StripeHelper extends StripeHelperBase {
} = this.mergeMetadata(planOld, abbrevProductOld);

const updateType =
productOrderNew > productOrderOld
parseInt(productOrderNew) > parseInt(productOrderOld)
? SUBSCRIPTION_UPDATE_TYPES.UPGRADE
: SUBSCRIPTION_UPDATE_TYPES.DOWNGRADE;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"interval_count": 1,
"livemode": false,
"metadata": {
"productOrder": 0,
"productOrder": "0",
"emailIconURL": "http://example.com/icon-new",
"successActionButtonURL": "http://example.com/download-new"
},
Expand Down Expand Up @@ -93,7 +93,7 @@
"interval_count": 1,
"livemode": false,
"metadata": {
"productOrder": 0,
"productOrder": "0",
"emailIconURL": "http://example.com/icon-new",
"successActionButtonURL": "http://example.com/download-new"
},
Expand Down Expand Up @@ -121,7 +121,7 @@
"interval": "month",
"interval_count": 1,
"metadata": {
"productOrder": 1,
"productOrder": "1",
"emailIconURL": "http://example.com/icon-old",
"successActionButtonURL": "http://example.com/download-old"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-auth-server/test/local/payments/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -5163,7 +5163,7 @@ describe('StripeHelper', () => {
.successActionButtonURL,
'product:termsOfServiceURL': termsOfServiceURL,
'product:privacyNoticeURL': privacyNoticeURL,
productOrder: 0,
productOrder: '0',
},
};

Expand Down

0 comments on commit d84af5e

Please sign in to comment.