package jp.pay;

public abstract class Payjp {
	public static final String LIVE_API_BASE = "https://api.pay.jp";
	public static final String VERSION = "0.1.0";
	public static volatile String apiKey;
	public static volatile String apiVersion;

	private static volatile String apiBase = LIVE_API_BASE;


	/**
	 * (FOR TESTING ONLY) If you'd like your API requests to hit your own
	 * (mocked) server, you can set this up here by overriding the base api URL.
	 */
	public static void overrideApiBase(final String overriddenApiBase) {
		apiBase = overriddenApiBase;
	}

	public static String getApiBase() {
		return apiBase;
	}
}

@@ -294,16 +294,144 @@
 _BASE;%0A%0A
+%09static %7B%0A%09%09final String _apiBase = System.getProperty(%22jp.pay.api.baseUrl%22);%0A%09%09if (_apiBase != null)%0A%09%09%09apiBase = _apiBase;%0A%09%7D%0A
 %0A%09/**%0A%09 

make endpoint URL overridable by java properties