Hosted UI Dialogs

Introduction

Features accessed within the dialogs are often multi-step processes requiring user input on one or more pages. The results will be sent to your application on the final step of the process, if the user completes the process without canceling or closing the dialog.

The response handlers for the hosted UI dialogs are more like event handlers than they are like callbacks. For this reason, they are set once and reused for each invocation of a hosted UI dialog.

Examples

Type Method URL
UI pay https://ssodemo.acceleratepayments.com/sso.cfm?...
UI addPlan https://ssodemo.acceleratepayments.com/sso.cfm?...
UI editPlan https://ssodemo.acceleratepayments.com/sso.cfm?...
UI addSubscription https://ssodemo.acceleratepayments.com/sso.cfm?...
UI editSubscription https://ssodemo.acceleratepayments.com/sso.cfm?...
UI transactions https://ssodemo.acceleratepayments.com/sso.cfm?...

One Time Payment Dialog

Implement a method for handling the One Time Payment dialog responses:

private void OneTimePaymentDialogCallback(ClearGage.SSO.Response.Transaction[] transactions)
{
	// Do something with the response here.
}

Set the OneTimePaymentDialogCallback property in the SsoHelper component:

this.ssoHelper.OneTimePaymentDialogCallback =
	new ClearGage.SSO.OneTimePaymentDialogResponseHandler(
		this.OneTimePaymentDialogCallback
	);

Display the One Time Payment dialog by setting the DocumentText property of the WebBrowser control:

// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetOneTimePaymentDialogHtml(
	patient: patient,
	amount: 50.00
);

Recent Transactions Dialog

Implement a method for handling the Recent Transactions dialog responses:

private void RecentTransactionsDialogCallback(ClearGage.SSO.Response.Transaction[] transactions)
{
	// Do something with the response here.
}

Set the RecentTransactionsDialogCallback property in the SsoHelper component:

this.ssoHelper.RecentTransactionsDialogCallback =
	new ClearGage.SSO.RecentTransactionsDialogResponseHandler(
		this.RecentTransactionsDialogCallback
	);

Display the Recent Transactions dialog by setting the DocumentText property of the WebBrowser control:

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetRecentTransactionsDialogHtml(
	patientId: "TEST001"
);

Add Payment Plan Dialog

Implement a method for handling the Add Payment Plan dialog responses:

private void AddPaymentPlanDialogCallback(ClearGage.SSO.Response.PaymentPlanDetails planDetails)
{
	// Do something with the response here.
}

Set the AddPaymentPlanDialogCallback property in the SsoHelper component:

this.ssoHelper.AddPaymentPlanDialogCallback =
	new ClearGage.SSO.AddPaymentPlanDialogResponseHandler(
		this.AddPaymentPlanDialogCallback
	);

Display the Add Payment Plan dialog by setting the DocumentText property of the WebBrowser control:

// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetAddPaymentPlanDialogHtml(
	patient: patient,
	amount: 500.00
);

Edit Payment Plan Dialog

Implement a method for handling the Edit Payment Plan dialog responses:

private void EditPaymentPlanDialogCallback(ClearGage.SSO.Response.PaymentPlanDetails planDetails)
{
	// Do something with the response here.
}

Set the EditPaymentPlanDialogCallback property in the SsoHelper component:

this.ssoHelper.EditPaymentPlanDialogCallback =
	new ClearGage.SSO.EditPaymentPlanDialogResponseHandler(
		this.EditPaymentPlanDialogCallback
	);

Display the Edit Payment Plan dialog by setting the DocumentText property of the WebBrowser control:

// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetEditPaymentPlanDialogHtml(
	planId: "D4TQ435K-A4CRAIS2"
);

Add Subscription Dialog

Implement a method for handling the Add Subscription dialog responses:

private void AddSubscriptionDialogCallback(ClearGage.SSO.Response.SubscriptionDetails subscriptionDetails)
{
	// Do something with the response here.
}

Set the AddSubscriptionDialogCallback property in the SsoHelper component:

this.ssoHelper.AddSubscriptionDialogCallback =
	new ClearGage.SSO.AddSubscriptionDialogResponseHandler(
		this.AddSubscriptionDialogCallback
	);

Display the Add Subscription dialog by setting the DocumentText property of the WebBrowser control:

// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetAddSubscriptionDialogHtml(
	patient: patient,
	amount: 25.00
	paymentFrequency: "M",
	paymentDate: "1",
	paymentStartDate: "1/1/2015",
	paymentEndDate: "12/31/2015",
	planDescription: "Monthly Membership"
);
Payment Frequency Options

The following values can be passed for the paymentFrequency field.

M Monthly
BM Bi-Monthly (twice a month)
BW Bi-Weekly (every 2 weeks)
W Weekly
Q Quarterly (Jan, Apr, Jul, Oct)
A Anually

When the paymentFrequency is "M" (Monthly) or "Q" (Quarterly), the paymentDate field value is the day of the month (1 - 31), or "99" to automatically select the last day of the month.

When the paymentFrequency is "W" (Weekly) or "BW" (Bi-Weekly), the paymentDate field value is the day of the week (1 [Sunday] - 7 [Saturday]).

When the paymentFrequency is "BM" (Bi-Monthly), the paymentDate field value is the first payment date (same options as Monthly) and second payment date (same options as Monthly), separated by a comma. Example: "15,99" to select the 15th of the month and the last day of the month.

When the paymentFrequency is "A" (Annually), the paymentDate field value is the month (1 [January] - 12 [December]) and day (same options as Monthly), without a year value (mm/dd). Example: "10/1" to select the 1st of October, or "12/99" to select the last day of December.

Edit Subscription Dialog

Implement a method for handling the Edit Subscription dialog responses:

private void EditSubscriptionDialogCallback(ClearGage.SSO.Response.SubscriptionDetails subscriptionDetails)
{
	// Do something with the response here.
}

Set the EditSubscriptionDialogCallback property in the SsoHelper component:

this.ssoHelper.EditSubscriptionDialogCallback =
	new ClearGage.SSO.EditSubscriptionDialogResponseHandler(
		this.EditSubscriptionDialogCallback
	);

Display the Edit Subscription dialog by setting the DocumentText property of the WebBrowser control:

// Create a Patient object for passing information about this patient to the dialog
ClearGage.SSO.Patient patient = new ClearGage.SSO.Patient();
patient.PatientId = "TEST001";
patient.FirstName = "John";
patient.LastName = "Doe";

// Populate web browser HTML
webBrowser1.DocumentText = this.ssoHelper.GetEditSubscriptionDialogHtml(
	subscriptionId: "D4TQ435K-S7681D40"
);