mirror of
https://github.com/fleetdm/fleet
synced 2026-05-06 06:48:54 +00:00
Website: Update stripe webhook (#27241)
Changes: - updated the stripe webhook to support `invoice.paid` events when a subscription's host count is not increased.
This commit is contained in:
parent
02ee1f8372
commit
ceec0e4cdd
1 changed files with 4 additions and 0 deletions
|
|
@ -177,6 +177,10 @@ module.exports = {
|
|||
// e.g., 'Remaining time on 9 × Fleet premium hosts after 17 Feb 2024'
|
||||
return _.startsWith(item.description, 'Remaining');
|
||||
});
|
||||
// If this no line item that starts with "Remaining" was found, select the first line item on the invoice.
|
||||
if(!updatedSubscriptionInfo){
|
||||
updatedSubscriptionInfo = itemsOnThisInvoice[0];
|
||||
}
|
||||
// Convert the subscription cycle's period end timestamp from Stripe into a JS timestamp.
|
||||
// Note: with most subscription changes, this value will be indentical to the existing license key's expiration
|
||||
// timestamp. We do this here to handle situations where the subscription period has been adjusted in the Stripe UI.
|
||||
|
|
|
|||
Loading…
Reference in a new issue