RequestCurrentKeys Method
Used to retrieve the current encryption keys from Paymentech.
Object Oriented Interface
public function doRequestCurrentKeys();
Procedural Interface
inpaydirect_ptechcanadiandebit_do_requestcurrentkeys($res);
Remarks
This method retrieves the current encryption keys from Paymentech, and stores them in the ResponsePINKey and ResponseMACKey properties. These keys are used by the PIN pad device to encrypt customer PINs and to create and validate MAC hash values, and are normally updated after every Authorize transaction. But when the PIN pad is first initialized (or when the PIN pad becomes out of sync with the Paymentech Server) you must retrieve the current keys using this method.
Keys are required to be renewed every:
- 200 Transactions
- 24 Hours
- Each time a Batch is released for settlement
- Whenever the PIN pad loses sync with the server
If the ResponseForceKeyRequest property is True after any transaction, you must immediately perform a RequestCurrentKeys transaction before sending any more authorizations.
For example:
class.MerchantNumber = "yourMerchantNumber" class.TerminalNumber = "100" class.ClientNumber = "0002" class.UserId = "yourUserId" class.Password = "yourPassword" class.SequenceNumber = 1 class.PinPadSerialNumber = "FFFFFFFFFFFFFFFF" ' retrieved from your PIN Pad class.RequestCurrentKeys()Now load the ResponsePINKey and ResponseMACKey into the PIN Pad device.