Billing for Gateway Images

What is the standard way to write a billing event for a Gateway image in the Document Module?

Best Answer

  • For images, the billing event is orchestrated in the Website module. Standard procedure is to pass in the image guid and that is used to look up the corresponding Reporting Name in Novus. For GATEWAY images there is no guid since the image is not on Novus. There are two options here: 1. If there is a single reporting name that should be used in a particular situation that Website can recognize, a unique appFunction can be configured to always use that reporting name. For example, if Website knows it is displaying a particular type of report, it can pass UDS a particular appFunction and the “static” reporting name will be used. 2. If there is something other than the item id which should be used to obtain the reporting name, PAC can be used to load information in PMD . When Website calls UDS, they pass the “other” information (namespace, type, providerId) to UDS (in addition to the item id), and UDS calls PMD to obtain the reporting name. The properties for these extra items can be set in DocumentController (for gateway Dockets this is done in DocketsController) in the Website module. In DocumentController you will see we are keying off of image ttypes and either setting a different App Function or setting the "other" properties (ProviderId, Namespace, and Type) and passing them into InitializeTransactionalbillingData respectively. That function is what sets up the properties that will be used to make the billing request that gets sent from Website to UDS. The user will only be billed if two things happen: 1.) The correct Reporting Name is returned from the initial billing info request and 2.) Document returns a status of 200(OK) saying that the image was returned successfully to the user.