com.global.api.terminals.pax.responses.EbtResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of globalpayments-sdk Show documentation
Show all versions of globalpayments-sdk Show documentation
API for processing payments through Global Payments
package com.global.api.terminals.pax.responses;
import com.global.api.entities.enums.ControlCodes;
import com.global.api.entities.enums.PaxMsgId;
import com.global.api.entities.exceptions.MessageException;
import com.global.api.terminals.pax.subgroups.*;
import com.global.api.utils.MessageReader;
public class EbtResponse extends PaxDeviceResponse {
public EbtResponse(byte[] buffer) throws MessageException {
super(buffer, PaxMsgId.T05_RSP_DO_EBT);
}
@Override
protected void parseResponse(MessageReader br) throws MessageException {
super.parseResponse(br);
if (deviceResponseCode.equals("000000")) {
hostResponse = new HostResponse(br);
transactionType = br.readToCode(ControlCodes.FS);
amountResponse = new AmountResponse(br);
accountResponse = new AccountResponse(br);
traceResponse = new TraceResponse(br);
avsResponse = new AvsResponse(br);
commercialResponse = new CommercialResponse(br);
ecomResponse = new EcomSubGroup(br);
extDataResponse = new ExtDataSubGroup(br);
mapResponse();
}
}
}