AuthManager.URLShopperArgs

Ee825028.c++_on(en-US,CS.10).gifEe825028.vb_off(en-US,CS.10).gif

Use this method to generate a Uniform Resource Locator (URL) encoded query string of name/value pairs and append the ticket to the query string if a ticket is set.

Definition

Function URLShopperArgs(pVarURLParameters As Variant,pVarURLValues As Variant) As String

Parameters

pVarURLParameters

[in] A SafeArray that contains the parameter names.

pVarURLValues

[in] A SafeArray that contains the values corresponding to the parameter names.

Return Values

If this method completes successfully, it returns a String that contains the encrypted URL string.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_UPM_AUTHMANAGER_API_ASP_ONLY &HC1004C24 This method should only be called within an ASP page.
MSG_UPM_AUTH_SITE_NEEDED_ERROR &HC1004C10 The Initialize method must be called with the installed site name before calling this method.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

This method concatenates the parameter name/value pairs into a URL-encoded string and appends the ticket. This is useful for cookieless shopping support. This method will fail if the two arrays containing the parameters and values are not the same size.

If both types of tickets exist, the MSCSAuth ticket takes precedence.

Use the URLArgs method to perform URL encoding of parameter/value pairs without appending the ticket.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' saParameterNames and saParameterValues are SafeArrays
' sURLShopArg is a string
' oAuthManager is a Commerce AuthManager object

saParameterNames(0) = "sku1"
saParameterNames(1) = "sku3"
saParameterValues(0) = "12345"
saParameterValues(1) = "98765"
sURLShopArg = oAuthManager.URLShopperArgs(saParameterNames, saParameterValues)

' sURLShopArg = "sku1=12345&sku3=98765&MSCSAuth=Q0H4SE915ASH2KC000Q79QB1E"

See Also

AuthManager Object

AuthManager.SetProperty

AuthManager.SetAuthTicket

AuthManager.SetProfileTicket

AuthManager.URLArgs


All rights reserved.