4D Payments SDK 2016 .NET Edition

Questions / Feedback?

GetResponseDataToMAC Method

Returns a string containing data to validate against the MACValue using a PIN pad device.


public string GetResponseDataToMAC();
Public Function GetResponseDataToMAC() As String


Each successful response to a transaction will include a MACKey and a MACValue. The MACKey (and PINKey) should be loaded into the PIN pad device upon receipt. The MACValue is a string encrypted by the Paymentech server using the MACKey, and is included in every successful response message. The original unencrypted data is returned by the GetResponseDataToMAC method. After loading the MACKey into the PIN pad device, send both MACValue and GetResponseDataToMAC to the PIN pad device for validation. If the PIN pad indicates the MAC matches, you're done, and you can continue processing transactions. However, if the PIN pad indicates the MAC did not match, you must immediately perform a MACReversal transaction, and consider the request as not approved.

A mismatched MAC value may mean that something was corrupted in data transmission, the response packet was tampered with, or that the keys loaded into your PIN pad device are not synchronized with Paymentech. Try synchronizing your keys with the RequestCurrentKeys method and then re-submitting the transaction.

Copyright (c) 2021 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 8017]