Discussions
Sample Code from IMIS SDK - Is there a replacement for this code or can anyone make it work?
almost 7 years ago by Jack
This is code from developer.imis.com - I am trying to load an Invoice into the Shopping Cart. Billing Cycle has already run, but I need the Invoice. The Invoice has this strange notation ####:###### - specifically the second set of numbers which I need to feed to the ItemDetails page/content record.
It appears to be in this format :
"CASH:{partyId}:{billingRunResults.LegacyBillingDataUsedByService.BillingLogKey}"
Does anyone know how to get this code to work, or how to replace this code, or know whether this code is necessary if I want to load Renewal Membership Dues to the cart?
Or can someone steer me toward the more modern approach?
// // Run membership fees billing cycle
string billingCycle = "Regular Membership Fees";
ILegacyBillingService billingService = Resolve<ILegacyBillingService>();
LegacyBillingData runData = new LegacyBillingData
{
BillingCycleId = billingCycle,
BillingRunName = "{billingCycle} Test",
IsRenewal = true,
IndividualBillingPartyId = partyId,
RunDate = tomorrow,
EffectiveDate = effectiveDate
};
LegacyBillingResultsData billingRunResults = billingService.Run(runData);
// Instantiate invoice ID, cart manager for renewal invoice, and find invoice by the ID
string invoiceId = "CASH:{partyId}:{billingRunResults.LegacyBillingDataUsedByService.BillingLogKey}";