package eleme.openapi.sdk.config;

import eleme.openapi.sdk.utils.StringUtils;

public class OverallContext {

    public static boolean isInit = false;

    public static String app_key;
    public static String app_secret;
    public static String oauthCodeUrl;
    public static String oauthTokenUrl;
    public static String apiUrl;

    public OverallContext(boolean sandbox, String appKey, String appSecret) {
        if (StringUtils.areNotEmpty(appKey, appKey)) {
            isInit = true;
            return;
        }
        app_key = appKey;
        app_secret = appSecret;
        if (sandbox) {
            oauthCodeUrl = BasicURL.OAuth.SANDBOX_AUTHORIZE;
            oauthTokenUrl = BasicURL.OAuth.SANDBOX_TOKEN;
            apiUrl = BasicURL.OpenApi.SANDBOX_Api;
        } else {
            oauthCodeUrl = BasicURL.OAuth.PRODUCTION_AUTHORIZE;
            oauthTokenUrl = BasicURL.OAuth.PRODUCTION_TOKEN;
            apiUrl = BasicURL.OpenApi.PRODUCTION_Api;
        }
    }
}

@@ -406,19 +406,36 @@
 pSecret)
+ throws Exception
  %7B%0A
-
         
@@ -524,14 +524,98 @@
     
-return
+System.out.println(%22init.....%22);%0A        %7D else %7B%0A            throw new Exception(%22%E5%88%9D%E5%A7%8B%E5%8C%96%E5%A4%B1%E8%B4%A5%22)
 ;%0A  

modify config