com.hps.integrator.entities.altpayment.HpsAltPaymentCreateSession 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.entities.altpayment;
import com.hps.integrator.infrastructure.Element;
import com.hps.integrator.infrastructure.ElementTree;
import java.util.Dictionary;
public class HpsAltPaymentCreateSession extends HpsAltPaymentResponse {
private String sessionId;
private String redirectUrl;
public String getSessionId() {
return sessionId;
}
public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}
public String getRedirectUrl() {
return redirectUrl;
}
public void setRedirectUrl(String redirectUrl) {
this.redirectUrl = redirectUrl;
}
public HpsAltPaymentCreateSession fromElementTree(ElementTree rsp) {
super.fromElementTree(rsp);
Element session = rsp.get("Transaction").firstChild();
if(session.has("Session")) {
Dictionary pairs = nvpToArray(session.get("Session"));
this.setSessionId(pairs.get("SessionId"));
this.setRedirectUrl(pairs.get("RedirectUrl"));
}
return this;
}
}