using System; using System.Collections.Generic; using iBilling.Client; namespace iBilling.Samples { public class Scenario8 { public static void Main(string[] args){ //Set up clients' settings; Dictionary config = new Dictionary(); config[SessionConnection.PROCESSOR_HOST] = "http://server.ibillingclient.org/ibilling/xmlhttps"; config["debug"] = true; //Login; Session session = Session.Login(2000, "welcome", config); //Find payment plan; PaymentPlan paymentPlan = session.LoadPaymentPlan("csharp.pp-2"); //Add 2 freeze after first week; paymentPlan.Add(1, 2, true); //Mark object for persistence; session.Save(paymentPlan); //Synchronize changes with the server; try{ session.Synchronize(); } catch(Exception ex){ //Be sure to properly handle exception, this is just a sample solution; Console.WriteLine(ex.Message); return ; } //Logout; session.Logout(); } } }