Scenario 6: CFScript

From UniCharge Integration Library
Jump to: navigation, search

Download Source File

<cfscript>
	// Create Session component
	session = CreateObject( 'component', 'Session' );
	// Login
	session.login(2000, "password", "https://[server-name]/ibilling/xmlhttps");
	// Find payment plan
	paymentPlan  = session.loadPaymentPlan("cfs.pp-1");
	// Execute delete last 6 charges
	paymentPlan.removeRange(5, 6);
	// 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
		WriteOutput(ex.message);
		return ;
	}
	// Logout
	session.logout();
 
 
</cfscript>

Download Source File

Personal tools
Namespaces

Variants
Actions
Integration Info
Library Documentation
Toolbox