From 2ccec9290cb9af9150caec7a453aeb7af1c15787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20N=C3=A9meth?= Date: Thu, 16 Jan 2025 18:05:43 +0100 Subject: [PATCH] Update src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sára El-Saig --- .../Handlers/SubscriptionStripeWebhookEventHandler.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs index 96055500..6553b0ef 100644 --- a/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs +++ b/src/Modules/OrchardCore.Commerce.Payment.Stripe/Handlers/SubscriptionStripeWebhookEventHandler.cs @@ -56,8 +56,9 @@ public async Task ReceivedStripeEventAsync(Event stripeEvent) subscriptionPart.Status.Text = SubscriptionStatuses.Active; // invoice.PeriodEnd doesn't show the current period, see Stripe docs: - // End of the usage period during which invoice items were added to this invoice. This looks back one - // period for a subscription invoice. Use the line item period to get the service period for each price. + // https://docs.stripe.com/api/invoices/object#invoice_object-period_end + // "End of the usage period during which invoice items were added to this invoice. This looks back one + // period for a subscription invoice. Use the line item period to get the service period for each price." subscriptionPart.EndDateUtc.Value = invoice.Lines.Data.Find(data => !data.Proration)?.Period.End; subscriptionPart.PaymentProviderName.Text = StripePaymentProvider.ProviderName; subscriptionPart.IdInPaymentProvider.Text = invoice.SubscriptionId;