NAME
AuthRevRes - SET AuthRevRes message data structures and routines
SYNOPSIS
#include <set_msg.h>

typedef struct AuthRevRes_ {
    asn1set__MessageWrapper      messageWrapper;
    asn1set__AuthRevResData      authRevResData;

    cert_identity                gatewaySignatureCID;
    cert_identity                merchantKeyExchangeCID;

    /* only Merchant uses */
    asn1set__AuthRevResBaggage   authRevResBaggage;

    /* only Gateway uses */
    struct AuthToken_            authTokenNew;
    struct CapToken_             capTokenNew;

#define                          AuthRevRes__authTokenNew          0
#define                          AuthRevRes__capTokenNew           1
    UCHAR                        _present[1];
} *AuthRevRes;

AuthRevRes safe_cast_AuthRevRes(msg)
    set_msg            msg;             /* IN */

DESCRIPTION
AuthRevRes contains the data from a SET AuthRevRes message in native C form. See the asn_types.h and asn1set.h header files for the declarations of the various types. See the SET specification for a description of individual fields.
FIELDS
See documentation on AuthToken for information on the struct AuthToken_ field and CapToken for information on the struct CapToken_ field.

A call to make_set_msg() results in the protocol layer filling in the following fields:

 *    messageWrapper.messageHeader.version
 *    messageWrapper.messageHeader.date
 *    messageWrapper.messageHeader.messageIDs
 *    messageWrapper.messageHeader.rrPID
 *    messageWrapper.messageHeader.swIdent
 *    messageWrapper.message._choice
 *    authRevResData.authRevTags.authRevRRTags
 *    authRevResData.brandCRLIdentifier (optional)
 *    authRevResData.gkThumb (optional)
 *    gatewaySignatureCID
 *    gatewayKeyExchangeCID
 *    merchantKeyExchangeCID
 *    panToken

It is unwise for applications to change the contents of the fields filled in by the protocol layer.

After calling make_set_msg(), gateway software must fill in the following required fields:

 *    authToken (optional)
 *    authRevResData.authNewAmt

Non-required fields may be left empty at the discretion of the gateway application, subject to any business constraints placed on the application.

OPTIONAL FIELDS

The _present element is used for specifying the presence or absence of optional elements. The macros SET_PRESENT(), IS_PRESENT(), SET_ABSENT(), and IS_ABSENT() are used to specify or query the status of optional elements. See documentation on ASN.1/DER runtime types for additional information.

When sending a message, the presence or absence must be set (using SET_PRESENT() or SET_ABSENT()) prior to calling send_set_msg(). It is usually unnecessary to invoke the SET_ABSENT() macro because absent is the default setting for blank messages.

When receiving a message, presence or absence can be determined (using the IS_PRESENT() or IS_ABSENT() macro) after calling decode_set_msg().

AuthRevRes__authToken
The gateway software indicates to SETREF that the data contained in the authTokenData field should be included in the AuthRevRes message by setting AuthRevRes__authToken to present.

Merchant software does not use this optional element.

AuthRevRes__capToken
The gateway software indicates to SETREF that a CapToken, which includes the data contained in the capTokenData field, should be included with the AuthRevRes message by setting AuthRevRes__capTokenData to present.

Merchant software does not use this optional element.

CACHING
Payment Gateway
      STATE_AUTHRETNUM               get
      STATE_AUTHREVREQ_RRPID         get
      STATE_CARDEXPIRY               get
      STATE_GATEWAY_KEYID            get
      STATE_GATEWAY_SIGID            get
      STATE_MERCHANT_KEYID           get
      STATE_PAN                      get
      STATE_RRTAGS                   get
      STATE_TRANSIDS                 get
Merchant
      STATE_AUTHRESPAYLOAD           put
      STATE_AUTHREVREQ_RRPID         get
      STATE_CAPTOKEN                 put
      STATE_PI                       put
      STATE_TRANSIDS                 put
RETURN VALUES
On success, safe_cast_AuthRevRes() returns a pointer to an AuthRevRes data structure. Objects of type set_msg that were not created with message type asn1set__Message__authRevRes will cause safe_cast_AuthRevRes() to fail. On failure, safe_cast_AuthRevRes() returns a 0 pointer.
SEE ALSO
set_msg, AuthReq, CapReq, CapRes, PInitReq, PInitRes, PReq, PRes
NOTES
There is a difference between non-required and optional. Non-required fields may be omitted according to the SET protocol. Optional fields may be omitted according to ASN.1 encoding rules. In some messages, a field may be optional according to ASN.1, but still required by the SET protocol. In these cases, the application must fill in these fields.

Optional fields that are filled in require an application of the SET_PRESENT() macro. See documentation on ASN.1/DER runtime types for additional information.

EXAMPLE
A more complete, explicated example is provided in the Implementor's Guide.
    status = create_set_msg(&response, app_ctx, heap);
    assert(status == NO_ERROR);

    msg_type = asn1set__Message__authRevRes;
    status = make_set_msg(response, app_ctx, msg_cache, msg_type);
    assert(status == NO_ERROR);

    authRevRes = safe_cast_AuthRevRes(response);
    assert(authRevRes != 0);
   
    authRevRes->messageWrapper.messageHeader.swIdent._choice = asn1set__SWIdent__visibleString;
    authRevRes->messageWrapper.messageHeader.swIdent.u.visibleString = "AcquirerServ v0.3b";

    /* ... */

    status = send_set_msg(reponse, app_ctx, msg_cache, outstream)
    assert(status == NO_ERROR);

BUGS
This document describes a beta implementation. The information contained in this document may be incomplete and is subject to change.

Copyright © 1996, 1997, Visa International Service Association and MasterCard International Incorporated
All Rights Reserved.