Class Veriplace_CallbackOptions

Description

Specifies optional parameters for an asynchronous request whose result will be delivered by HTTP callback.

If you pass a Veriplace_CallbackOptions instance with a non-null callback URI to an asynchronous Veriplace method, then when the result of the request is ready, Veriplace will send an HTTP POST message to that URI. There are two modes with different message formats:

The APIs that support asynchronous requests also have methods for decoding the callback messages into result objects: Veriplace_GetLocationAPI::getCallbackResult() and Veriplace_InvitationAPI::getCallbackResult(). If you are not using the SDK to decode callbacks -- i.e. if the callback URI points to a service on some other platform -- you may wish to use additional options for controlling the message format: see createExtendedCallback() and createFormEncodedExtendedCallback().

Located in /Veriplace/Types.php (line 557)


	
			
Method Summary
 static void createExtendedCallback (string $uri, [string $encoding = null])
 static void createFormEncodedExtendedCallback (string $uri, string $encoding, string $formParamName)
 static void createSummaryCallback (string $uri)
Methods
static createExtendedCallback (line 593)

Constructs an instance with a callback URI, using the extended callback format.

You may also specify the desired message encoding; if omitted, this defaults to XML.

static void createExtendedCallback (string $uri, [string $encoding = null])
static createFormEncodedExtendedCallback (line 623)

Constructs an instance with a callback URI, using the extended callback format and specifying that the callback message should be wrapped in a form-encoded query string.

This is equivalent to createExtendedCallback(), except that the XML or JSON document will not be delivered directly in the message body, but will be converted to a query string in the form "name=value", where name is the $formParamName you specified and value is the result of URL-encoding the entire result document. The message will not contain form-encoded parameters for individual result properties; to get the individual properties, you will need to parse the XML or JSON document.

You may find this useful if you are receiving callbacks on some other platform, using a web gateway that only supports form-encoded messages.

static void createFormEncodedExtendedCallback (string $uri, string $encoding, string $formParamName)
  • string $uri: the callback URI (must be secure)
  • string $encoding: the preferred content type for the message; if specified, must be equal to Veriplace_ClientConfiguration::XML_CONTENT_TYPE or Veriplace_ClientConfiguration::JSON_CONTENT_TYPE
  • string $formParamName: the parameter name to use for form-encoding
static createSummaryCallback (line 576)

Constructs an instance with only a callback URI.

The callback will use the summary format.

static void createSummaryCallback (string $uri)
  • string $uri: the callback URI

Documentation generated on Sun, 29 Aug 2010 04:08:39 -0700 by phpDocumentor 1.4.1