www in docker support

This commit is contained in:
MaddoScientisto 2026-04-22 18:41:37 +02:00
commit c227fce036
2145 changed files with 399596 additions and 58 deletions

View file

@ -0,0 +1,346 @@
package it.acxent.bank.keyclient;
import it.acxent.bank._BankAdapter;
import it.acxent.common.Parm;
import it.acxent.db.ApplParmFull;
import it.acxent.reg.EcDc;
import java.net.URLEncoder;
public class KeyClientReq extends _BankAdapter {
public static final String LANG_CODE_IT = "ITA";
public static final String LANG_CODE_EN = "ENG";
public static final String LANG_CODE_ES = "SPA";
public static final String LANG_CODE_FR = "FRA";
public static final String LANG_CODE_DE = "GER";
public static final String LANG_CODE_ITA_ENG = "ITA-ENG";
public static final String LANG_CODE_JPN = "JPN";
public static final String DIV_CODE_LIRA = "18";
public static final String DIV_CODE_EURO = "242";
public static final String DIV_CODE_STERLINE = "2";
public static final String DIV_CODE_YEN = "71";
public static final String DIV_CODE_DOLLARL_HK = "103";
public static final String DIV_CODE_REAL = "234";
private String divisa;
private String codTrans;
private String mail;
private String importo;
private String languageId;
private String alias;
private String key;
private String url;
private String url_back;
public static final String P_KC_KEY = "KC_KEY";
public static final String P_URL_RESPONSE = "KC_URL_RESPONSE";
public static final String P_KC_ALIAS = "KC_ALIAS";
public static final String P_PAYMENT_OK_PAGE = "KC_PAY_OK";
public static final String P_PAYMENT_ERROR_PAGE = "KC_PAY_KO";
public static final String P_URL_RESPONSE_NULL = "KC_URL_RESPONSE_NULL";
public static final String TEST_ALIAS = "payment_testm_urlmac";
public static final String REQ_URL = "https://ecommerce.cim-italia.it/ecomm/DispatcherServlet";
public static final String DIV_CODE_DOLLARI = "1";
public String getCodTrans() {
return (this.codTrans == null) ? "" : this.codTrans;
}
public void setCodTrans(String myamount) {
this.codTrans = myamount;
}
public String getImporto() {
return (this.importo == null) ? "" : this.importo;
}
public void setImporto(String mybuyeremail) {
this.importo = mybuyeremail;
}
public String getMail() {
return (this.mail == null) ? "" : this.mail;
}
public void setMail(String mybuyername) {
this.mail = mybuyername;
}
public String getDivisa() {
return (this.divisa == null) ? "" : this.divisa;
}
public void setDivisa(String mycurrency) {
this.divisa = mycurrency;
}
public String getAlias() {
return (this.alias == null) ? "" : this.alias;
}
public void setAlias(String mycustominfo) {
this.alias = mycustominfo;
}
private String getMylanguageCode() {
if (getLanguageId().toLowerCase().equals("it"))
return "ITA";
if (getLanguageId().toLowerCase().equals("en"))
return "ENG";
if (getLanguageId().toLowerCase().equals("es\t"))
return "SPA";
if (getLanguageId().toLowerCase().equals("fr"))
return "FRA";
if (getLanguageId().toLowerCase().equals("de"))
return "GER";
return "";
}
public String getMacEsempio() {
String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=1esempiodicalcolomac";
String res = "";
try {
res = URLEncoder.encode(EcDc.encode64String(EcDc.cryptMD5Plain(temp)), "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
return res;
}
public String getMac() {
String temp = "codTrans=" + getCodTrans() + "divisa=" + getDivisa() + "importo=" +
getImportoUrl() + getKey();
String res = "";
try {
res = URLEncoder.encode(EcDc.encode64String(EcDc.cryptMD5Plain(temp)), "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
return res;
}
public String getLanguageId() {
return (this.languageId == null) ? "" : this.languageId;
}
public void setLanguageId(String lang) {
this.languageId = lang;
}
public String getFullRequestUrl() {
StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
theUrl.append("alias=");
theUrl.append(getAlias());
theUrl.append("&importo=");
theUrl.append(getImporto());
theUrl.append("&divisa=");
theUrl.append(getDivisa());
theUrl.append("&codTrans=");
theUrl.append(getCodTrans());
theUrl.append("&mail=");
theUrl.append(getMail());
theUrl.append("&mac=");
try {
theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
theUrl.append("&languageId=");
theUrl.append(getLanguageId());
theUrl.append("&url=");
theUrl.append(getUrl());
if (!getUrl_back().isEmpty()) {
theUrl.append("&url_back=");
theUrl.append(getUrl_back());
}
return theUrl.toString();
}
public String getRequestUrl() {
StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
theUrl.append("?alias=");
theUrl.append(getAlias());
theUrl.append("&importo=");
theUrl.append(getImportoUrl());
theUrl.append("&divisa=");
theUrl.append(getDivisa());
theUrl.append("&codTrans=");
theUrl.append(getCodTrans());
theUrl.append("&mail=");
theUrl.append(getMail());
theUrl.append("&mac=");
try {
theUrl.append(URLEncoder.encode(getMac(), "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
theUrl.append("&languageId=");
theUrl.append(getLanguageId());
theUrl.append("&url=");
theUrl.append(getUrl());
if (!getUrl_back().isEmpty()) {
theUrl.append("&url_back=");
theUrl.append(getUrl_back());
}
return theUrl.toString();
}
public String getKey() {
return this.key;
}
public void setKey(String key) {
this.key = key;
}
public String getImportoUrl() {
if (this.importo == null)
return "0000";
String temp = this.importo;
if (temp.indexOf('.') < 0) {
temp = temp + "00";
} else if (temp.length() - temp.indexOf('.') < 3) {
temp = temp + "0";
}
return temp.replace(".", "");
}
public String getUrl() {
return (this.url == null) ? "" : this.url.trim();
}
public void setUrl(String url) {
this.url = url;
}
public String getUrl_back() {
return (this.url_back == null) ? "" : this.url_back.trim();
}
public void setUrl_back(String url_back) {
this.url_back = url_back;
}
public String getTestRequestUrl() {
StringBuffer theUrl = new StringBuffer("https://ecommerce.cim-italia.it/ecomm/DispatcherServlet");
theUrl.append("?alias=");
theUrl.append("payment_testm_urlmac");
theUrl.append("&importo=1");
theUrl.append("&divisa=");
theUrl.append(getDivisa());
theUrl.append("&codTrans=");
theUrl.append(getCodTrans());
theUrl.append("&mail=");
theUrl.append(getMail());
theUrl.append("&mac=");
try {
theUrl.append(URLEncoder.encode(getMacEsempio(), "UTF-8"));
} catch (Exception e) {
e.printStackTrace();
}
theUrl.append("&languageId=");
theUrl.append(getLanguageId());
theUrl.append("&url=");
theUrl.append(getUrl());
if (!getUrl_back().isEmpty()) {
theUrl.append("&url_back=");
theUrl.append(getUrl_back());
}
return theUrl.toString();
}
public static void initApplicationParms(ApplParmFull ap) {
if (ap != null) {
String l_tipoParm = "PAYPAL";
Parm bean = new Parm(ap);
l_tipoParm = "KEY CLIENT";
bean.findByCodice("KC_PAY_KO");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_PAY_KO");
bean.setDescrizione("KC_PAY_KO");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payRes.jsp");
bean.setNota("KC_PAY_KO");
bean.save();
bean.findByCodice("KC_PAY_OK");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_PAY_OK");
bean.setDescrizione("KC_PAY_OK");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payRes.jsp");
bean.setNota("KC_PAY_OK");
bean.save();
bean.findByCodice("KC_KEY");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_KEY");
bean.setDescrizione("KC_KEY");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("esempiodicalcolomac");
bean.setNota("KC_KEY. mac di esempio: esempiodicalcolomac");
bean.save();
bean.findByCodice("KC_ALIAS");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_ALIAS");
bean.setDescrizione("KC_ALIAS");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payment_testm_urlmac");
bean.setNota("KC_KEY. ALIAS DI TEST: payment_testm_urlmac");
bean.save();
bean.findByCodice("KC_URL_RESPONSE_NULL");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_URL_RESPONSE_NULL");
bean.setDescrizione("KC_URL_RESPONSE_NULL");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://localhost/td/RicevutaKC.abl");
bean.setNota("KC_PAY_OK");
bean.save();
bean.findByCodice("KC_URL_RESPONSE");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("KC_URL_RESPONSE");
bean.setDescrizione("KC_URL_RESPONSE");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://localhost/td/RicevutaKC.abl");
bean.setNota("KC_URL_RESPONSE");
bean.save();
}
}
}

View file

@ -0,0 +1,149 @@
package it.acxent.bank.keyclient;
import it.acxent.bank._BankAdapter;
public class KeyClientResp extends _BankAdapter {
private long id_ordine;
private String importo;
private String data;
private String divisa;
private String session_id;
private String codTrans;
private String orario;
private String esito;
private String codAut;
private String BRAND;
private String nome;
private String cognome;
private String email;
private String mac;
public static final String ESITO_OK = "OK";
public static final String ESITO_KO = "KO";
public long getId_ordine() {
return this.id_ordine;
}
public void setId_ordine(long id_ordine) {
this.id_ordine = id_ordine;
}
public String getImporto() {
return this.importo;
}
public void setImporto(String importo) {
this.importo = importo;
}
public String getData() {
return this.data;
}
public void setData(String data) {
this.data = data;
}
public String getDivisa() {
return this.divisa;
}
public void setDivisa(String divisa) {
this.divisa = divisa;
}
public String getSession_id() {
return this.session_id;
}
public void setSession_id(String session_id) {
this.session_id = session_id;
}
public String getCodTrans() {
return this.codTrans;
}
public void setCodTrans(String codTrans) {
this.codTrans = codTrans;
}
public String getOrario() {
return this.orario;
}
public void setOrario(String orario) {
this.orario = orario;
}
public String getEsito() {
return this.esito;
}
public void setEsito(String esito) {
this.esito = esito;
}
public String getCodAut() {
return this.codAut;
}
public void setCodAut(String codAut) {
this.codAut = codAut;
}
public String getBRAND() {
return this.BRAND;
}
public void setBRAND(String brand) {
this.BRAND = brand;
}
public String getNome() {
return this.nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getCognome() {
return this.cognome;
}
public void setCognome(String cognome) {
this.cognome = cognome;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getMac() {
return this.mac;
}
public void setMac(String mac) {
this.mac = mac;
}
}