Просмотр исходного кода

Merge pull request #27498 from overleaf/mf-fix-subscriptionX-segmentation-stripe

[web] Only send one subscriptionId data in event segmentation for Stripe subscription to follow recurly

GitOrigin-RevId: 9e514d2991df768ea7e77bd5fa5f9d851c4ee8f0
M Fahru 1 год назад
Родитель
Сommit
1c4b55fff4
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      services/web/app/src/Features/Subscription/RecurlyEventHandler.js

+ 2 - 0
services/web/app/src/Features/Subscription/RecurlyEventHandler.js

@@ -329,6 +329,8 @@ async function _sendInvoicePaidEvent(userId, eventData) {
   const country = invoice.address?.country
   const collectionMethod = invoice.collection_method
   const subscriptionIds = {}
+  // This logic is currently only resulting in `subscriptionId1` being set, because real data shows that
+  // there is only one subscription_id per invoice for recurly.
   invoice.subscription_ids?.forEach((e, idx) => {
     if (idx < INVOICE_SUBSCRIPTION_LIMIT) {
       subscriptionIds[`subscriptionId${idx + 1}`] = e