Idempotency

SET requires that the protocol behavior be consistent irrespective of the number of times a message is received, a property called idempotency. The idempotency requirements are documented in the SET specification.

Using the history log, SETREF checks whether or not a message has been received previously. If a duplicate RRPID is detected, decode_set_msg() will return SET_WARN_RRPID_REPLAY after it has completed processing. Because decode_set_msg() has completed processing before returning this warning, it is possible to continue processing. It is the responsibility of the application-layer to implement any behavior that is specific to duplicate messages.

For instance, in the case of PInitReq, the application would likely continue processing as if this warning had never been returned. Conversely, in the case of PReq, the application would likely invoke implementation-specific behavior to insure that multiple purchase requests result in only single purchases.

In the case of AuthReq, decode_set_msg() may also return SET_ERR_ILLEGAL_PI_REPLAY if the payment instructions (PI) contained within the authorization request is a duplicate. Although it is legal to receive duplicate messages, it is illegal for payment instructions to be replayed.


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