www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,251 @@
|
|||
package it.acxent.bank.infogroup;
|
||||
|
||||
import it.acxent.bank._BankAdapter;
|
||||
import it.acxent.common.Parm;
|
||||
import it.acxent.common.StatusMsg;
|
||||
import it.acxent.db.ApplParmFull;
|
||||
import it.acxent.db.DBAdapter;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ShopnetReq extends _BankAdapter {
|
||||
public static final String LANG_CODE_IT = "0";
|
||||
|
||||
public static final String LANG_CODE_EN = "1";
|
||||
|
||||
public static final String LANG_CODE_ES = "2";
|
||||
|
||||
public static final String LANG_CODE_DE = "3";
|
||||
|
||||
public static final String DIV_CODE_EURO = "1";
|
||||
|
||||
private static NumberFormat nf2;
|
||||
|
||||
private String f;
|
||||
|
||||
private String l;
|
||||
|
||||
private String m;
|
||||
|
||||
private String o;
|
||||
|
||||
private String i;
|
||||
|
||||
private String d;
|
||||
|
||||
private String p;
|
||||
|
||||
private String c;
|
||||
|
||||
private String u;
|
||||
|
||||
private String n;
|
||||
|
||||
private String e;
|
||||
|
||||
private String action;
|
||||
|
||||
public static final String P_PAYMENT_ERROR_PAGE = "PAY_KO";
|
||||
|
||||
public static final String P_PAYMENT_OK_PAGE = "PAY_OK";
|
||||
|
||||
public static final long CC_DINERS = 2L;
|
||||
|
||||
public static final long CC_MASTERCARD = 1L;
|
||||
|
||||
public static final long CC_AMEX = 3L;
|
||||
|
||||
public static final long CC_VISA = 0L;
|
||||
|
||||
public static final String P_SHOPNET_PID = "SHOPNET_PID";
|
||||
|
||||
public static final String P_SHOPNET_ID = "SHOPNET_ID";
|
||||
|
||||
public static final String DEFAULT_SHOPNET_ACTION = "https://ecommerce.infogroup.it/shopnetplus/do";
|
||||
|
||||
public ShopnetReq() {}
|
||||
|
||||
public ShopnetReq(String lang) {
|
||||
setlang(lang);
|
||||
}
|
||||
|
||||
private void setlang(String l_lang) {
|
||||
if (l_lang.toLowerCase().equals("it")) {
|
||||
setL("0");
|
||||
} else if (l_lang.toLowerCase().equals("en")) {
|
||||
setL("1");
|
||||
} else if (l_lang.toLowerCase().equals("es\t")) {
|
||||
setL("2");
|
||||
} else {
|
||||
setL("0");
|
||||
}
|
||||
}
|
||||
|
||||
public String getF() {
|
||||
return (this.f == null) ? "" : this.f.trim();
|
||||
}
|
||||
|
||||
public void setF(String f) {
|
||||
this.f = f;
|
||||
}
|
||||
|
||||
public String getL() {
|
||||
return (this.l == null) ? "" : this.l.trim();
|
||||
}
|
||||
|
||||
public void setL(String l) {
|
||||
this.l = l;
|
||||
}
|
||||
|
||||
public String getM() {
|
||||
return (this.m == null) ? "" : this.m.trim();
|
||||
}
|
||||
|
||||
public void setM(String m) {
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
public String getO() {
|
||||
return (this.o == null) ? "" : this.o.trim();
|
||||
}
|
||||
|
||||
public void setO(String o) {
|
||||
this.o = o;
|
||||
}
|
||||
|
||||
public String getI() {
|
||||
return (this.i == null) ? "" : this.i.trim();
|
||||
}
|
||||
|
||||
public void setI(String i) {
|
||||
this.i = i;
|
||||
}
|
||||
|
||||
public String getD() {
|
||||
return (this.d == null) ? "" : this.d.trim();
|
||||
}
|
||||
|
||||
public void setD(String d) {
|
||||
this.d = d;
|
||||
}
|
||||
|
||||
public String getP() {
|
||||
return (this.p == null) ? "" : this.p.trim();
|
||||
}
|
||||
|
||||
public void setP(String p) {
|
||||
this.p = p;
|
||||
}
|
||||
|
||||
public String getC() {
|
||||
return (this.c == null) ? "" : this.c.trim();
|
||||
}
|
||||
|
||||
public void setC(String c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
public String getU() {
|
||||
return (this.u == null) ? "" : this.u.trim();
|
||||
}
|
||||
|
||||
public void setU(String u) {
|
||||
this.u = u;
|
||||
}
|
||||
|
||||
public String getN() {
|
||||
return (this.n == null) ? "" : this.n.trim();
|
||||
}
|
||||
|
||||
public void setN(String n) {
|
||||
this.n = n;
|
||||
}
|
||||
|
||||
public String getE() {
|
||||
return (this.e == null) ? "" : this.e.trim();
|
||||
}
|
||||
|
||||
public void setE(String e) {
|
||||
this.e = e;
|
||||
}
|
||||
|
||||
public String getAction() {
|
||||
return (this.action == null) ? "https://ecommerce.infogroup.it/shopnetplus/do" : this.action.trim();
|
||||
}
|
||||
|
||||
public void setAction(String action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public void setImporto(double l_importo) {}
|
||||
|
||||
public NumberFormat getNf2() {
|
||||
if (nf2 == null) {
|
||||
nf2 = NumberFormat.getInstance(Locale.ITALIAN);
|
||||
nf2.setMaximumFractionDigits(2);
|
||||
nf2.setMinimumFractionDigits(2);
|
||||
}
|
||||
return nf2;
|
||||
}
|
||||
|
||||
public static void initApplicationParms(ApplParmFull ap) {
|
||||
if (ap != null) {
|
||||
DBAdapter.logDebug(true, "shopnet chechout initParms: start");
|
||||
String l_tipoParm = "SHOPNET";
|
||||
StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
|
||||
Parm bean = new Parm(ap);
|
||||
l_tipoParm = "SHOPNET";
|
||||
bean.findByCodice("PAY_KO");
|
||||
bean.setFlgAdmin(0L);
|
||||
bean.setTipoParm(l_tipoParm);
|
||||
bean.setCodice("PAY_KO");
|
||||
bean.setDescrizione("PAY_KO");
|
||||
bean.setFlgTipo(0L);
|
||||
if (bean.getTesto().equals(""))
|
||||
bean.setTesto("payRes.jsp");
|
||||
bean.setNota("PAY_KO");
|
||||
bean.save();
|
||||
bean.findByCodice("PAY_OK");
|
||||
bean.setFlgAdmin(0L);
|
||||
bean.setTipoParm(l_tipoParm);
|
||||
bean.setCodice("PAY_OK");
|
||||
bean.setDescrizione("PAY_OK");
|
||||
bean.setFlgTipo(0L);
|
||||
if (bean.getTesto().equals(""))
|
||||
bean.setTesto("payRes.jsp");
|
||||
bean.setNota("PAY_OK");
|
||||
bean.save();
|
||||
bean.findByCodice("SHOPNET_ID");
|
||||
bean.setFlgAdmin(0L);
|
||||
bean.setTipoParm(l_tipoParm);
|
||||
bean.setCodice("SHOPNET_ID");
|
||||
bean.setDescrizione("SHOPNET_ID");
|
||||
bean.setFlgTipo(0L);
|
||||
bean.setNota("SHOPNET_ID");
|
||||
bean.save();
|
||||
bean.findByCodice("SHOPNET_PID");
|
||||
bean.setFlgAdmin(0L);
|
||||
bean.setTipoParm(l_tipoParm);
|
||||
bean.setCodice("SHOPNET_PID");
|
||||
bean.setDescrizione("SHOPNET_PID");
|
||||
bean.setFlgTipo(0L);
|
||||
bean.setNota("SHOPNET_PID");
|
||||
bean.save();
|
||||
DBAdapter.logDebug(true, "shopnet chechout initParms: stop");
|
||||
}
|
||||
}
|
||||
|
||||
public static final String getCC(long l_cc) {
|
||||
switch ((int)l_cc) {
|
||||
case 3:
|
||||
return "American Express";
|
||||
case 2:
|
||||
return "Diners";
|
||||
case 1:
|
||||
return "Mastercard";
|
||||
case 0:
|
||||
return "Visa";
|
||||
}
|
||||
return "??";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
package it.acxent.bank.infogroup;
|
||||
|
||||
import it.acxent.bank._BankAdapter;
|
||||
|
||||
public class ShopnetResp extends _BankAdapter {
|
||||
private long m;
|
||||
|
||||
private long o;
|
||||
|
||||
private long l;
|
||||
|
||||
private String a;
|
||||
|
||||
private long s;
|
||||
|
||||
private long id_ordine;
|
||||
|
||||
public static final long STATO_TRANS_NON_RICH = 1L;
|
||||
|
||||
public static final long STATO_TRANS_GESTITA = 2L;
|
||||
|
||||
public void fillResponse(String bean) {}
|
||||
|
||||
public long getId_ordine() {
|
||||
return this.id_ordine;
|
||||
}
|
||||
|
||||
public String getA() {
|
||||
return (this.a == null) ? "" : this.a.trim();
|
||||
}
|
||||
|
||||
public void setA(String a) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public long getM() {
|
||||
return this.m;
|
||||
}
|
||||
|
||||
public void setM(long m) {
|
||||
this.m = m;
|
||||
}
|
||||
|
||||
public long getO() {
|
||||
return this.o;
|
||||
}
|
||||
|
||||
public void setO(long o) {
|
||||
this.o = o;
|
||||
}
|
||||
|
||||
public long getL() {
|
||||
return this.l;
|
||||
}
|
||||
|
||||
public void setL(long l) {
|
||||
this.l = l;
|
||||
}
|
||||
|
||||
public long getS() {
|
||||
return this.s;
|
||||
}
|
||||
|
||||
public void setS(long s) {
|
||||
this.s = s;
|
||||
}
|
||||
|
||||
public long getStato() {
|
||||
return getS();
|
||||
}
|
||||
|
||||
public String getCodiceAutorizzazione() {
|
||||
return getA();
|
||||
}
|
||||
|
||||
public void setId_ordine(long id_ordine) {
|
||||
this.id_ordine = id_ordine;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue