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

/*
 *    CapRevRes is defined using CapRevOrCredRes
 */
#define    CapRevRes_          CapRevOrCredRes_
#define    CapRevRes           CapRevOrCredRes

/*
 *
 *    CapRevOrCredRes is used by CapRevRes, CredRes, and CredRevRes
 *
 */
typedef struct CapRevOrCredRes_ {
    asn1set__MessageWrapper          messageWrapper;
    asn1set__CapRevOrCredResData     capRevOrCredResData;

    cert_identity                    gatewaySignatureCID;
    cert_identity                    merchantKeyExchangeCID;
} *CapRevOrCredRes;

CapRevRes safe_cast_CapRevRes(msg)
    set_msg            msg;             /* IN */
DESCRIPTION
CapRevRes contains the data from a SET CapRevRes 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.

CapRevRes message objects of type set_msg can be cast to type CapRevRes using the safe_cast_CapRevRes() routine.

FIELDS
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
 *    capRevOrCredResData.capRevOrCredResRRTags.rrTags
 *    capRevOrCredResData.capRevOrCredResRRTags.brandCRLIdentifier (optional)
 *    capRevOrCredResData.capRevOrCredResRRTags.peThumb (optional)
 *    capRevOrCredResData.capRevOrCredResItemSeq->capRevOrCredResItem.transIDs
 *    capRevOrCredResData.capRevOrCredResItemSeq->capRevOrCredResItem.authRRPID
 *    gatewaySignatureCID
 *    merchantKeyExchangeCID

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:

 *    capRevOrCredResData.capRevOrCredResItemSeq->capRevOrCredResItem.capRevOrCredResPayload.capRevOrCredCode
 *    capRevOrCredResData.capRevOrCredResItemSeq->capRevOrCredResItem.capRevOrCredResPayload.capRevOrCredActualAmt

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

CACHING
Payment Gateway
      STATE_AUTHREQ_RRPID            get
      STATE_CAPREVREQ_RRPID          get
      STATE_CREDREQ_RRPID            get
      STATE_CREDREVREQ_RRPID         get
      STATE_GATEWAY_SIGID            get
      STATE_MERCHANT_KEYID           get
      STATE_RRTAGS                   get
      STATE_TRANSIDS                 get
Merchant
      STATE_CAPREVREQ_RRPID          get
      STATE_CREDREQ_RRPID            get
      STATE_CREDREVREQ_RRPID         get
RETURN VALUES
On success, safe_cast_CapRevRes() returns a pointer to a CapRevRes data structure. Objects of type set_msg that were not created with message type asn1set__Message__capRevRes will cause safe_cast_CapRevRes() to fail. On failure, safe_cast_CapRevRes() returns a 0 pointer.
SEE ALSO
set_msg, AuthReq, AuthRes, CapReq, 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, it is incumbent on the application to 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.
    capRevRes = safe_cast_CapRevRes(response);
    assert(capRevRes != 0);
   
    capRevRes->messageWrapper.messageHeader.swIdent._choice = asn1set__SWIdent__visibleString;
    capRevRes->messageWrapper.messageHeader.swIdent.u.visibleString = "AcquirerServ v0.3b";

    /* ... */

    capRevRes->capRevOrCredResData.capRevOrCredResItemSeq->
       capRevOrCredResItem.capRevOrCredResPayload.capRevOrCredCode =
                                       asn1set__CapRevOrCredCode__success;

    /* ... */

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.