#include <set_msg.h> typedef struct AuthRevReq_ { asn1set__MessageWrapper messageWrapper; asn1set__AuthRevReqData authRevReqData; asn1set__AuthRevReqBaggage authRevReqBaggage; cert_identity merchantSignatureCID; cert_identity gatewayKeyExchangeCID; /* only Gateway uses pi_content */ struct PI_ pi_content; } *AuthRevReq; AuthRevReq safe_cast_AuthRevReq(msg) set_msg msg; /* IN */
AuthRevReq
contains the data from a SET AuthRevReq 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. AuthRevReq
message objects of type set_msg
can be cast to type AuthRevReq
using the
safe_cast_AuthRevReq()
routine.
Merchant software should ignore
pi_content
.
struct PI_
field.
If the PInitReq/PInitRes
pair was not exchanged, then before
calling make_set_msg()
, merchant software must insert the
following state into the cache_ctx
:
* STATE_GATEWAY_KEYID * STATE_MERCHANT_SIGID
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 * authRevReqData.authRevTags.authRevRRTags.rrpid * authRevReqData.authReqData * authRevReqData.authResPayload * authRevReqBaggage.capToken * authRevReqBaggage.pi * merchantSignatureCID * gatewayKeyExchangeCIDIt is unwise for applications to change the contents of the fields filled in by the protocol layer.
After calling make_set_msg()
, merchant software must fill in the following required fields:
* authRevReqData.authRevTags.authRevRRTags.merTermIDs.merchantID * authRevReqData.authRevTags.authRevRRTags.currentDate * authRevReqData.authNewAmtNon-required fields can be left empty, at the discretion of the merchant application.
STATE_AUTHRETNUM put STATE_AUTHREVREQ_RRPID put STATE_CARDEXPIRY put STATE_GATEWAY_KEYID put STATE_GATEWAY_SIGID put STATE_MERCHANT_KEYID put STATE_PAN put STATE_RRTAGS put STATE_TRANSIDS put
STATE_AUTHREQDATA get STATE_AUTHREQ_RRPID get STATE_AUTHRESPAYLOAD get STATE_AUTHRETNUM get STATE_AUTHREVREQ_RRPID put STATE_CAPTOKEN get STATE_GATEWAY_KEYID get STATE_MERCHANT_SIGID get STATE_PI get
safe_cast_AuthRevReq()
returns a pointer to an AuthRevReq
data structure. Objects of type
set_msg
that were not created with message type asn1set__Message__authRevReq
will cause
safe_cast_AuthRevReq()
to fail. On failure, safe_cast_AuthRevReq()
returns a 0 pointer. 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.
status = create_set_msg(&request, app_ctx, heap); assert(status == NO_ERROR); msg_type = asn1set__Message__authRevReq; status = make_set_msg(request, app_ctx, msg_cache, msg_type); assert(status == NO_ERROR); authRevReq = safe_cast_AuthRevReq(request); assert(authRevReq != 0); authRevReq->messageWrapper.messageHeader.swIdent._choice = asn1set__SWIdent__visibleString; authRevReq->messageWrapper.messageHeader.swIdent.u.visibleString = "MerchantCode v1.0"; /* ... */ authRevReq->authRevReqData.authRevTags.authRevRRTags.merTermIDs. merchantID.u.visibleString = "MerchantID"; authRevReq->authRevReqData.authRevTags.authRevRRTags.merTermIDs. merchantID._choice = asn1set__MerchantID__visibleString; authRevReq->authRevReqData.authRevTags.authRevRRTags.currentDate = time(0); /* ... */ status = send_set_msg(request, app_ctx, msg_cache, outstream) assert(status == NO_ERROR);
Copyright © 1996, 1997, Visa International Service Association and MasterCard International Incorporated
All Rights Reserved.