![JAR search and dependency download from the Maven repository](/logo.png)
com.hps.integrator.terminals.DeviceMessage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of secure-submit Show documentation
Show all versions of secure-submit Show documentation
The SecureSubmit Java SDK simplifies processing of credit card transactions using Heartland Payment Systems' Portico Payment Gateway
package com.hps.integrator.terminals;
import com.hps.integrator.abstractions.IDeviceMessage;
import com.hps.integrator.infrastructure.emums.ControlCodes;
import com.hps.integrator.infrastructure.utils.HpsEnumUtils;
public class DeviceMessage implements IDeviceMessage {
byte[] buffer;
public DeviceMessage(byte[] buffer){
this.buffer = buffer;
}
public byte[] getSendBuffer() { return this.buffer; }
@Override
public String toString(){
StringBuilder sb = new StringBuilder();
for(byte b : buffer){
if(HpsEnumUtils.isDefined(ControlCodes.class, b)){
ControlCodes code = HpsEnumUtils.parse(ControlCodes.class, b);
sb.append(code.toString());
}
else sb.append((char)b);
}
return sb.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy