Regalamiunsorriso/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/sella/SellaReq.java

195 lines
5.2 KiB
Java

package it.acxent.bank.sella;
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;
public class SellaReq extends _BankAdapter {
public static final String LANG_CODE_IT = "1";
public static final String LANG_CODE_EN = "2";
public static final String LANG_CODE_ES = "3";
public static final String LANG_CODE_FR = "4";
public static final String LANG_CODE_DE = "5";
public static final String DIV_CODE_LIRA = "18";
public static final String DIV_CODE_EURO = "242";
public static final String P_COD_ESER_SELLA = "COD_ESER_SELLA";
public static final String P_SELLA_FULL = "SELLA_FULL";
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 myshoplogin;
private String mycurrency;
private String myamount;
private String myshoptransactionID;
private String mybuyername;
private String mybuyeremail;
private String mylanguage;
private String lang;
private String mycustominfo;
public static final String P_PAYMENT_OK_PAGE = "SELLA_OK";
public static final String P_PAYMENT_ERROR_PAGE = "SELLA_KO";
public static final String DIV_CODE_DOLLARI = "1";
public String getMyamount() {
return (this.myamount == null) ? "" : this.myamount;
}
public void setMyamount(String myamount) {
this.myamount = myamount;
}
public String getMybuyeremail() {
return (this.mybuyeremail == null) ? "" : this.mybuyeremail;
}
public void setMybuyeremail(String mybuyeremail) {
this.mybuyeremail = mybuyeremail;
}
public String getMybuyername() {
return (this.mybuyername == null) ? "" : this.mybuyername;
}
public void setMybuyername(String mybuyername) {
this.mybuyername = mybuyername;
}
public String getMycurrency() {
return (this.mycurrency == null) ? "" : this.mycurrency;
}
public void setMycurrency(String mycurrency) {
this.mycurrency = mycurrency;
}
public String getMycustominfo() {
return (this.mycustominfo == null) ? "" : this.mycustominfo;
}
public void setMycustominfo(String mycustominfo) {
this.mycustominfo = mycustominfo;
}
public String getMylanguage() {
if (this.mylanguage == null || this.mylanguage.isEmpty())
this.mylanguage = getMylanguageCode();
return this.mylanguage;
}
private String getMylanguageCode() {
if (getLang().toLowerCase().equals("it"))
return "1";
if (getLang().toLowerCase().equals("en"))
return "2";
if (getLang().toLowerCase().equals("es"))
return "3";
if (getLang().toLowerCase().equals("fr"))
return "4";
if (getLang().toLowerCase().equals("de"))
return "5";
return "2";
}
public String getMyshoplogin() {
return (this.myshoplogin == null) ? "" : this.myshoplogin;
}
public void setMyshoplogin(String myshoplogin) {
this.myshoplogin = myshoplogin;
}
public String getMyshoptransactionID() {
return (this.myshoptransactionID == null) ? "" : this.myshoptransactionID;
}
public void setMyshoptransactionID(String myshoptransactionID) {
this.myshoptransactionID = myshoptransactionID;
}
public void setMylanguage(String mylanguage) {
this.mylanguage = mylanguage;
}
public String getLang() {
return (this.lang == null) ? "" : this.lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public static void initApplicationParms(ApplParmFull ap) {
boolean debug = false;
if (ap != null) {
DBAdapter.logDebug(debug, "SELLA chechout initParms: start");
String l_tipoParm = "SELLA";
StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
Parm bean = new Parm(ap);
bean.findByCodice("COD_ESER_SELLA");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("COD_ESER_SELLA");
bean.setDescrizione("COD_ESER_SELLA");
bean.setFlgTipo(0L);
bean.setNota("CODICE ESERCENTE BANCA SELLA");
bean.save();
bean.findByCodice("SELLA_FULL");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("SELLA_FULL");
bean.setDescrizione("SELLA_FULL");
bean.setFlgTipo(5L);
bean.setNota("SPECIFICA SE IL CONTRATTO CON SELLA E' DI TIPO FULL");
bean.save();
bean.findByCodice("SELLA_KO");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("SELLA_KO");
bean.setDescrizione("SELLA_KO");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payRes.jsp");
bean.setNota("SELLA_KO");
bean.save();
bean.findByCodice("SELLA_OK");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("SELLA_OK");
bean.setDescrizione("SELLA_OK");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payRes.jsp");
bean.setNota("SELLA_OK");
bean.save();
DBAdapter.logDebug(debug, "SELLA chechout initParms: stop");
StatusMsg.deleteMsgByTag(ap, "INIT");
}
}
}