File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -9,5 +9,9 @@ public class BackupMessage
9
9
public string BillingCycle { get ; set ; }
10
10
11
11
public int Price { get ; set ; }
12
+
13
+ public string SenderEmail { get ; set ; }
14
+
15
+ public string OrganizationBillingEmail { get ; set ; }
12
16
}
13
17
}
Original file line number Diff line number Diff line change @@ -373,7 +373,9 @@ await backupMessages.AddMessageAsync(new CloudQueueMessage(JsonConvert.Serialize
373
373
PlanId = hook . marketplace_purchase . plan . id ,
374
374
Price = price ,
375
375
SaleType = recurrentSale ,
376
- BillingCycle = hook . marketplace_purchase . billing_cycle
376
+ BillingCycle = hook . marketplace_purchase . billing_cycle ,
377
+ SenderEmail = hook . sender . email ,
378
+ OrganizationBillingEmail = hook . marketplace_purchase . account . organization_billing_email
377
379
} ) ) ) ;
378
380
}
379
381
@@ -405,13 +407,22 @@ await marketplaceTable.ExecuteAsync(TableOperation.InsertOrMerge(new Marketplace
405
407
price = hook . marketplace_purchase . plan . yearly_price_in_cents / 100 ;
406
408
}
407
409
410
+ var returnType = "cancelled" ;
411
+
412
+ if ( hook . marketplace_purchase . on_free_trial == true )
413
+ {
414
+ returnType = "cancelled_free_trial" ;
415
+ }
416
+
408
417
await backupMessages . AddMessageAsync ( new CloudQueueMessage ( JsonConvert . SerializeObject (
409
418
new BackupMessage
410
419
{
411
420
PlanId = hook . marketplace_purchase . plan . id ,
412
421
Price = price ,
413
- SaleType = "cancelled" ,
414
- BillingCycle = hook . marketplace_purchase . billing_cycle
422
+ SaleType = returnType ,
423
+ BillingCycle = hook . marketplace_purchase . billing_cycle ,
424
+ SenderEmail = hook . sender . email ,
425
+ OrganizationBillingEmail = hook . marketplace_purchase . account . organization_billing_email
415
426
} ) ) ) ;
416
427
}
417
428
You can’t perform that action at this time.
0 commit comments