Regalamiunsorriso/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/poste/PeReq.java

303 lines
8.9 KiB
Java

package it.acxent.bank.poste;
import it.acxent.bank._BankAdapter;
import it.acxent.common.Parm;
import it.acxent.common.StatusMsg;
import it.acxent.db.ApplParmFull;
public class PeReq extends _BankAdapter {
public static final String LANG_CODE_USA = "USA";
public static final String LANG_CODE_ITA = "ITA";
public static final String DIV_CODE_EURO = "978";
private String currency;
private String trackId;
private String mail;
private String resourcePath;
private String language;
private String alias;
private String responseURL;
private String errorURL;
private String userName;
private String amt;
private String action;
private String flgTipoPagamentoPe;
private String merchantId;
private String shopId;
public static final String P_USE_IGFS = "PE_USE_IGFS";
public static final String P_NO_CERTIFICATO = "PE_NO_CERTIFICATO";
public static final String P_RESOURCE_PATH = "PE_RESOURCE_PATH";
public static final String P_URL_POST_RESPONSE = "PE_URL_POST_RESPONSE";
public static final String ALIAS_POSTEPAY = "03";
public static final String ALIAS_BPOPL = "01";
public static final String ALIAS_CC = "02";
public static final String ALIAS_BPIOL = "04";
public static final String ALIAS_POSTEPAY_IMPRESA = "06";
public static final String P_MERCHANT_ID = "PE_MERCHANT_ID";
public static final String DEFAULT_OK_KO_PAGE = "payResPe.jsp";
public static final String P_URL_REDIRECT_RESULT = "PE_URL_REDIRECT_RESULT";
public static final String P_PAYMENT_OK_PAGE = "PE_PAY_OK";
public static final String P_PAYMENT_ERROR_PAGE = "PE_PAY_KO";
public static final String P_URL_POST_RESPONSE_ERROR = "URL_POST_RESPONSE_ERROR";
public static final String TEST_ALIAS = "payment_testm_urlmac";
public static final String REQ_URL = "https://ecommerce.cim-italia.it/ecomm/DispatcherServlet";
public String getTrackId() {
return (this.trackId == null) ? "" : this.trackId;
}
public void setTrackId(String myamount) {
this.trackId = myamount;
}
public String getAmt() {
return (this.amt == null) ? "" : this.amt;
}
public void setAmt(String mybuyeremail) {
this.amt = mybuyeremail;
}
public String getMail() {
return (this.mail == null) ? "" : this.mail;
}
public void setMail(String mybuyername) {
this.mail = mybuyername;
}
public String getCurrency() {
return (this.currency == null) ? "" : this.currency;
}
public void setCurrency(String mycurrency) {
this.currency = mycurrency;
}
public String getAlias() {
return getMerchantId() + getMerchantId();
}
public void setAlias(String mycustominfo) {
this.alias = mycustominfo;
}
public String getLanguage() {
return (this.language == null) ? "" : this.language;
}
public void setLanguage(String lang) {
this.language = lang;
}
public String getImportoUrl() {
return (this.amt == null) ? "" : this.amt;
}
public String getResponseURL() {
return (this.responseURL == null) ? "" : this.responseURL.trim();
}
public void setResponseURL(String url) {
this.responseURL = url;
}
public String getErrorURL() {
return (this.errorURL == null) ? "" : this.errorURL.trim();
}
public void setErrorURL(String url_back) {
this.errorURL = url_back;
}
public static void initApplicationParms(ApplParmFull ap) {
if (ap != null) {
Parm bean = new Parm(ap);
String l_tipoParm = "POST ECOMMERCE";
StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
bean.findByCodice("PE_MERCHANT_ID");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_MERCHANT_ID");
bean.setDescrizione("PE_MERCHANT_ID");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("PE_MERCHANT_ID");
bean.setNota("PE_MERCHANT_ID");
bean.save();
bean.findByCodice("PE_PAY_KO");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_PAY_KO");
bean.setDescrizione("PE_PAY_KO");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payResPe.jsp");
bean.setNota("PE_PAY_KO");
bean.save();
bean.findByCodice("PE_PAY_OK");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_PAY_OK");
bean.setDescrizione("PE_PAY_OK");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("payResPe.jsp");
bean.setNota("PE_PAY_OK");
bean.save();
bean.findByCodice("PE_NO_CERTIFICATO");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_NO_CERTIFICATO");
bean.setDescrizione("PE_NO_CERTIFICATO");
bean.setFlgTipo(1L);
bean.setNota("PE_NO_CERTIFICATOSOLO PER IGFS: 0--> CON CERTIFICATO, PRODUZIONE<br>1 --> SENZA CERTIFICATO, SOLO TEST");
bean.save();
bean.findByCodice("PE_USE_IGFS");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_USE_IGFS");
bean.setDescrizione("PE_USE_IGFS");
bean.setFlgTipo(1L);
bean.setNota("PE_USE_IGFS: 0--> vecchia versione con resource.cgn<br>1 --> nuova versione con file properties");
bean.save();
bean.findByCodice("PE_RESOURCE_PATH");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_RESOURCE_PATH");
bean.setDescrizione("PE_RESOURCE_PATH");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("/home/xxx/xxx/");
bean.setNota("PE_RESOURCE_PATH: per la versione vecchia con / finale. Path assoluto dove trovare resource.cgn<br>per la versione nuova il percorso completo del .properties compreso il nome del file.");
bean.save();
bean.findByCodice("PE_URL_POST_RESPONSE");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_URL_POST_RESPONSE");
bean.setDescrizione("PE_URL_POST_RESPONSE");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://test.f3.com/tf/GetResponsePe.abl");
bean.setNota("PE_URL_POST_RESPONSE: URL HTTP RICHIAMATA TRAMITE POST. DEVE ESSERE VISIBILE SU INTERNET (NO LOCALHOST)");
bean.save();
bean.findByCodice("URL_POST_RESPONSE_ERROR");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("URL_POST_RESPONSE_ERROR");
bean.setDescrizione("URL_POST_RESPONSE_ERROR");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://test.f3.com/tf/RicevutaPE.abl");
bean.setNota("URL_POST_RESPONSE_ERROR: URL HTTP RICHIAMATA TRAMITE REDIRECT. DEVE ESSERE VISIBILE SU INTERNET (NO LOCALHOST)");
bean.save();
bean.findByCodice("PE_URL_REDIRECT_RESULT");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("PE_URL_REDIRECT_RESULT");
bean.setDescrizione("PE_URL_REDIRECT_RESULT");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://localhost/tf/RicevutaPE.abl");
bean.setNota("PE_URL_REDIRECT_RESULT: URL HTTP RICHIAMATA TRAMITE REDIRECT. PUO' ESSERE LOCALHOST IN FASE DI SVILUPPO");
bean.save();
StatusMsg.deleteMsgByTag(ap, "INIT");
}
}
public String getResourcePath() {
return (this.resourcePath == null) ? "" : this.resourcePath;
}
public void setResourcePath(String resourcePath) {
this.resourcePath = resourcePath;
}
public String getUserName() {
return (this.userName == null) ? "" : this.userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getAction() {
return "4";
}
public void setAction(String action) {
this.action = action;
}
public String getTipoPagamentoPE(String tipoPagamento) {
if (tipoPagamento.equals("04"))
return "conto bpiol";
if (tipoPagamento.equals("01"))
return "conto bpiol";
if (tipoPagamento.equals("04"))
return "conto bpol";
if (tipoPagamento.equals("02"))
return "carta di credito";
if (tipoPagamento.equals("03"))
return "carta postepay";
if (tipoPagamento.equals("06"))
return "carta postepay Impresa";
return "??";
}
public String getFlgTipoPagamentoPe() {
return (this.flgTipoPagamentoPe == null) ? "" : this.flgTipoPagamentoPe.trim();
}
public void setFlgTipoPagamentoPe(String flgTipoPagamentoPe) {
this.flgTipoPagamentoPe = flgTipoPagamentoPe;
}
public String getMerchantId() {
return (this.merchantId == null) ? "" : this.merchantId.trim();
}
public void setMerchantId(String merchantId) {
this.merchantId = merchantId;
}
public String getShopId() {
return (this.shopId == null) ? "" : this.shopId.trim();
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
}