Regalamiunsorriso/decompiled-libs/www/acxent-bank-1.0.1/it/acxent/bank/stripe/StripeResp.java

106 lines
3.8 KiB
Java

package it.acxent.bank.stripe;
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 StripeResp extends _BankAdapter {
public static final String STATUS_OK = "succeeded";
private static final long serialVersionUID = -1758842932626231725L;
private String payment_intent_client_secret;
private String redirect_status;
public static final String P_STRIPE_PUBLIC_KEY = "STRIPE_PUBLIC_KEY";
public static final String P_STRIPE_PRIVATE_KEY = "STRIPE_PRIVATE_KEY";
public static final String P_STRIPE_OK_PAGE = "STRIPE_OK_PAGE";
public static final String P_STRIPE_ERROR_PAGE = "STRIPE_ERROR_PAGE";
public static final String P_STRIPE_RETURN_URL = "STRIPE_RETURN_URL";
public static final String DEFAULT_OK_KO_PAGE = "documento.jsp";
public String getPayment_intent_client_secret() {
return (this.payment_intent_client_secret == null) ? "" : this.payment_intent_client_secret;
}
public void setPayment_intent_client_secret(String payment_intent_client_secret) {
this.payment_intent_client_secret = payment_intent_client_secret;
}
public String getRedirect_status() {
return (this.redirect_status == null) ? "" : this.redirect_status;
}
public void setRedirect_status(String redirect_status) {
this.redirect_status = redirect_status;
}
public static void initApplicationParms(ApplParmFull ap) {
boolean debug = false;
if (ap != null) {
DBAdapter.logDebug(debug, "STRIPE initParms: start");
String l_tipoParm = "STRIPE";
StatusMsg.updateMsgByTag(ap, "INIT", l_tipoParm);
Parm bean = new Parm(ap);
bean.findByCodice("STRIPE_PRIVATE_KEY");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("STRIPE_PRIVATE_KEY");
bean.setDescrizione("STRIPE_PRIVATE_KEY");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("sk_test_51MHqBEFFhtsn3P5AuY6fj2eSYzDUabXnSINJXzvztxBsZUCg8KbZXrkhKBgYpJV4zxcxSFrrD228AgA5bHj6kTAT00cwVDtxCH");
bean.setNota("SECRET KEY STRIPE");
bean.save();
bean.findByCodice("STRIPE_PUBLIC_KEY");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("STRIPE_PUBLIC_KEY");
bean.setDescrizione("STRIPE_PUBLIC_KEY");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("pk_test_51MHqBEFFhtsn3P5AVGKxfuDIKk9Na3FNvcf5WfuMEvcWDt794JTsDfJilOs8r3JGmhknmfS97f77we0vqB8w99fB004zcxkFdk");
bean.setNota("PUBLIC KEY STRIPE");
bean.save();
bean.findByCodice("STRIPE_RETURN_URL");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("STRIPE_RETURN_URL");
bean.setDescrizione("STRIPE_RETURN_URL");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("http://localhost/cc/StripeResponse.abl");
bean.setNota("URL DI RITORNO. DI SOLITO StripeResponse.abl");
bean.save();
bean.findByCodice("STRIPE_ERROR_PAGE");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("STRIPE_ERROR_PAGE");
bean.setDescrizione("STRIPE_ERROR_PAGE");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("documento.jsp");
bean.setNota("STRIPE_OK_PAGE");
bean.save();
bean.findByCodice("STRIPE_OK_PAGE");
bean.setFlgAdmin(0L);
bean.setTipoParm(l_tipoParm);
bean.setCodice("STRIPE_OK_PAGE");
bean.setDescrizione("STRIPE_OK_PAGE");
bean.setFlgTipo(0L);
if (bean.getTesto().equals(""))
bean.setTesto("documento.jsp");
bean.setNota("STRIPE_OK_PAGE");
bean.save();
DBAdapter.logDebug(debug, "STRIPE initParms: start");
}
}
}