All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hps.integrator.terminals.pax.subgroups.AvsResponse Maven / Gradle / Ivy

Go to download

The SecureSubmit Java SDK simplifies processing of credit card transactions using Heartland Payment Systems' Portico Payment Gateway

There is a newer version: v2.5.2
Show newest version
package com.hps.integrator.terminals.pax.subgroups;

import com.hps.integrator.abstractions.IResponseSubGroup;
import com.hps.integrator.infrastructure.emums.ControlCodes;
import com.hps.integrator.infrastructure.utils.HpsStringUtils;
import com.hps.integrator.infrastructure.utils.MessageReader;

public class AvsResponse implements IResponseSubGroup {
    String avsResponseCode;
    String avsResponseMessage;

    public String getAvsResponseCode() {
        return avsResponseCode;
    }
    public String getAvsResponseMessage() {
        return avsResponseMessage;
    }

    public AvsResponse(MessageReader br) {
        String values = br.readToCode(ControlCodes.FS);
        if (HpsStringUtils.isNullOrEmpty(values))
            return;

        String[] data = values.split("\\[US\\]");
        try {
            avsResponseCode = data[0];
            avsResponseMessage = data[1];
        }
        catch (IndexOutOfBoundsException e) {
            // Nom nom
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy