File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/Exceptionless.Web/Controllers Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -246,11 +246,13 @@ public async Task<ActionResult<Invoice>> GetInvoiceAsync(string id)
246246 foreach ( var line in stripeInvoice . Lines . Data )
247247 {
248248 var item = new InvoiceLineItem { Amount = line . Amount / 100.0m , Description = line . Description } ;
249- if ( line . Price is not null )
249+ // Note: In Stripe.net v48, Price property was removed from InvoiceLineItem
250+ // We'll use available properties and fallback to basic information
251+ if ( ! String . IsNullOrEmpty ( line . PriceId ) )
250252 {
251- string planName = line . Price . Nickname ?? _billingManager . GetBillingPlan ( line . Price . Id ) ? . Name ?? line . Price . Id ;
252- var intervalText = line . Price . Recurring ? . Interval ?? "one-time" ;
253- var priceAmount = line . Price . UnitAmount . HasValue ? ( line . Price . UnitAmount . Value / 100.0 ) : 0.0 ;
253+ string planName = _billingManager . GetBillingPlan ( line . PriceId ) ? . Name ?? line . PriceId ;
254+ var intervalText = "one-time" ; // Default since Recurring info is not directly available on line item
255+ var priceAmount = line . UnitAmount . HasValue ? ( line . UnitAmount . Value / 100.0 ) : 0.0 ;
254256 item . Description = $ "Exceptionless - { planName } Plan ({ priceAmount : c} /{ intervalText } )";
255257 }
256258
You can’t perform that action at this time.
0 commit comments