
com.paymentwall.java.Instance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of paymentwall-java Show documentation
Show all versions of paymentwall-java Show documentation
This library allows developers to use Paymentwall APIs (Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).
package com.paymentwall.java;
import java.util.ArrayList;
public abstract class Instance extends Messages {
protected Config config = Config.getInstance();
protected ArrayList errors = new ArrayList();
public enum httpMethod {GET, POST}
public String getErrorSummary() {
String result = "";
for (String each: getErrors()) {
result += each + '\n';
}
return result;
}
protected Config getConfig() {
if (config==null) { config = Config.getInstance(); }
return config;
}
protected String getApiBaseUrl() { return getConfig().getApiBaseUrl(); }
protected int getApiType() { return getConfig().getLocalApiType(); }
protected String getPublicKey() { return getConfig().getPublicKey(); }
protected String getPrivateKey() { return getConfig().getPrivateKey(); }
protected void appendToErrors(String error) { errors.add(error); }
protected ArrayList getErrors() { return errors; }
protected ArrayList sList(final String val) {
return new ArrayList(){{ add(val); }};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy