Class MagTekInfo
Use the MagtekInfo object for the Magtek encrypted card reader related information.
Following example shows how to use the MagtekInfo object.
// Swipe is the SwipeCard object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGets the Authentication Value 1 generated with the PCode.Gets the Authentication Value 2 generated with the PCode.Gets the Authentication Value 3 generated with the PCode.protected ContextGets the Device Serial Number.getEncMP()Gets the encrypted MagnePrint information.Gets the Encryption Block TypeGets the Encrypted Track 1Gets the Encrypted Track 2Gets the Encrypted Track 3getKsn()Gets the KSN.Gets the MagTek Card TypeGets the MagTek Password.Gets the MagTek User Name.Gets the Merchant's ID.Gets the MP Status.getPan4()Gets the last 4-digits of the PAN.getpCode()Gets the generated Protection Code.Gets the Registerd By.protected StringBufferGets the Requestbuffer used for creating the actual request string.Gets the Swiped ECR Host.voidsetAuthValue1(String authValue1) Sets the Authentication Value 1 generated with the PCode.voidsetAuthValue2(String authValue2) Sets the Authentication Value 2 generated with the PCode.voidsetAuthValue3(String authValue3) Sets the Authentication Value 3 generated with the PCode.protected voidsetContext(Context context) voidsetDeviceSN(String deviceSN) Sets the Device Serial Number.voidSets the encrypted MagnePrint information.voidsetEncryptionBlockType(String encryptionBlockType) Sets the Encryption Block TypevoidsetEncTrack1(String encTrack1) Sets the Encrypted Track 1voidsetEncTrack2(String encTrack2) Sets the Encrypted Track 2voidsetEncTrack3(String encTrack3) Sets the Encrypted Track 3voidSets the KSN.voidsetMagtekCardType(String magtekCardType) Sets the MagTek Card Type.voidsetMagtekPassword(String magtekPassword) Sets the MagTek Password.voidsetMagtekUserName(String magtekUserName) Sets the MagTek User Name.voidsetMerchantId(String merchantId) Sets the Merchant's ID.voidsetMpStatus(String mpStatus) Sets the MP Status.voidSets the last 4-digits of the PAN.voidSets the generated Protection Code.voidsetRegisteredBy(String registeredBy) Sets the Registered By.protected voidsetRequestBuffer(StringBuffer value) sets the StringBuffer to hold the request string.voidsetSwipedECRHost(String swipedECRHost) Sets the Swiped ECR Host.
-
Constructor Details
-
MagTekInfo
public MagTekInfo()ConstructorUse this class to set the MagTek related information. Used for encrypted swipe.
-
-
Method Details
-
generateRequest
protected void generateRequest() -
getEncMP
Gets the encrypted MagnePrint information.- Returns:
- encMP String
Maps to Payflow Parameter: ENCMP
-
setEncMP
Sets the encrypted MagnePrint information.- Parameters:
encMP- StringMaps to Payflow Parameter: ENCMP
-
getEncryptionBlockTyp
Gets the Encryption Block Type- Returns:
- encryptionBlockType String
Maps to Payflow Parameter: ENCRYPTIONBLOCKTYPE
-
setEncryptionBlockType
Sets the Encryption Block Type- Parameters:
encryptionBlockType- StringMaps to Payflow Parameter: ENCRYPTIONBLOCKTYPE
-
getEncTrack1
Gets the Encrypted Track 1- Returns:
- encTrack1 String
Maps to Payflow Parameter: ENCTRACK1
-
setEncTrack1
Sets the Encrypted Track 1- Parameters:
encTrack1- StringMaps to Payflow Parameter: ENCTRACK1
-
getEncTrack2
Gets the Encrypted Track 2- Returns:
- encTrack2 String
Maps to Payflow Parameter: ENCTRACK2
-
setEncTrack2
Sets the Encrypted Track 2- Parameters:
encTrack2- StringMaps to Payflow Parameter: ENCTRACK2
-
getEncTrack3
Gets the Encrypted Track 3- Returns:
- encTrack3 String
Maps to Payflow Parameter: ENCTRACK3
-
setEncTrack3
Sets the Encrypted Track 3- Parameters:
encTrack3- StringMaps to Payflow Parameter: ENCTRACK3
-
getKsn
Gets the KSN.- Returns:
- ksn String
Maps to Payflow Parameter: KSN
-
setKsn
Sets the KSN.- Parameters:
ksn- StringMaps to Payflow Parameter: KSN
-
getMagtekCardType
Gets the MagTek Card Type- Returns:
- magtekCardType String
Maps to Payflow Parameter: MAGTEKCARDTYPE
-
setMagtekCardType
Sets the MagTek Card Type.- Parameters:
magtekCardType- StringMaps to Payflow Parameter: MAGTEKCARDTYPE
-
getMpStatus
Gets the MP Status.- Returns:
- mpStatus String
Maps to Payflow Parameter: MPSTATUS
-
setMpStatus
Sets the MP Status.- Parameters:
mpStatus- StringMaps to Payflow Parameter: MPSTATUS
-
getRegisteredBy
Gets the Registerd By.- Returns:
- registeredBy String
Maps to Payflow Parameter: REGISTEREDBY
-
setRegisteredBy
Sets the Registered By.- Parameters:
registeredBy- StringMaps to Payflow Parameter: REGISTEREDBY
-
getSwipedECRHost
Gets the Swiped ECR Host.- Returns:
- swipedECRHost String
Maps to Payflow Parameter: SWIPEDECRHOST
-
setSwipedECRHost
Sets the Swiped ECR Host.- Parameters:
swipedECRHost- StringMaps to Payflow Parameter: SWIPEDECRHOST
-
getDeviceSN
Gets the Device Serial Number.- Returns:
- deviceSN String
Maps to Payflow Parameter: DEVICESN
-
setDeviceSN
Sets the Device Serial Number.- Parameters:
deviceSN- StringMaps to Payflow Parameter: DEVICESN
-
getMerchantId
Gets the Merchant's ID.- Returns:
- merchantId String
Maps to Payflow Parameter: MERCHANTID
-
setMerchantId
Sets the Merchant's ID.- Parameters:
merchantId- StringMaps to Payflow Parameter: MERCHANTID
-
getPan4
Gets the last 4-digits of the PAN.- Returns:
- pan4 String
Maps to Payflow Parameter: PAN4
-
setPan4
Sets the last 4-digits of the PAN.- Parameters:
pan4- StringMaps to Payflow Parameter: PAN4
-
getpCode
Gets the generated Protection Code.- Returns:
- pCode String
Maps to Payflow Parameter: PCODE
-
setpCode
Sets the generated Protection Code.- Parameters:
pCode- StringMaps to Payflow Parameter: PCODE
-
getAuthValue1
Gets the Authentication Value 1 generated with the PCode.- Returns:
- authValue1; String
Maps to Payflow Parameter: AUTHVALUE1
-
setAuthValue1
Sets the Authentication Value 1 generated with the PCode.- Parameters:
authValue1- ; StringMaps to Payflow Parameter: AUTHVALUE1
-
getAuthValue2
Gets the Authentication Value 2 generated with the PCode.- Returns:
- authValue2 String
Maps to Payflow Parameter: AUTHVALUE2
-
setAuthValue2
Sets the Authentication Value 2 generated with the PCode.- Parameters:
authValue2- StringMaps to Payflow Parameter: AUTHVALUE2
-
getAuthValue3
Gets the Authentication Value 3 generated with the PCode.- Returns:
- authValue3 String
Maps to Payflow Parameter: AUTHVALUE3
-
setAuthValue3
Sets the Authentication Value 3 generated with the PCode.- Parameters:
authValue3- StringMaps to Payflow Parameter: AUTHVALUE3
-
getMagtekUserName
Gets the MagTek User Name.- Returns:
- magtekUserName String
Maps to Payflow Parameter: MAGTEKUSERNAME
-
setMagtekUserName
Sets the MagTek User Name.- Parameters:
magtekUserName- StringMaps to Payflow Parameter: MAGTEKUSERNAME
-
getMagtekPassword
Gets the MagTek Password.- Returns:
- merchSvc String
Maps to Payflow Parameter: MAGTEKPASSWORD
-
setMagtekPassword
Sets the MagTek Password.- Parameters:
magtekPassword- StringMaps to Payflow Parameter: MAGTEKPASSWORD
-
getContext
-
setContext
-
getRequestBuffer
Gets the Requestbuffer used for creating the actual request string.- Returns:
- mRequestBuffer StringBuffer
-
setRequestBuffer
sets the StringBuffer to hold the request string.- Parameters:
value- StringBuffer
-