Exemplo n.º 1
0
 public AppBaseInfoHelper(string appkey)
 {
     _iAppBaseService = Himall.ServiceProvider.Instance <IAppBaseService> .Create;
     _AppKey          = appkey;
     if (string.IsNullOrWhiteSpace(_AppKey))
     {
         throw new HimallApiException(ApiErrorCode.Missing_App_Key, "app_key");
     }
     _AppSecret = "";
     try
     {
         _AppSecret = _iAppBaseService.GetAppSecret(_AppKey);
     }
     catch (Exception ex)
     {
         throw new HimallApiException(ApiErrorCode.Invalid_App_Key, "app_key");
     }
     if (string.IsNullOrWhiteSpace(_AppSecret))
     {
         throw new HimallApiException(ApiErrorCode.Insufficient_ISV_Permissions, "not set app_secreat");
     }
 }