示例#1
0
  private String openhuifu() {

    String signature = "payaccounts.php:" + System.currentTimeMillis() / 1000 + ":hxpay";
    UserInfo userInfo = new UserInfo();
    try {
      userInfo.signature =
          RegExpValidator.encodeBase64(
              UtiEncrypt.encryptAES(RegExpValidator.encodeBase64(signature.getBytes())).getBytes());
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    userInfo.version = SppaConstant.APP_VERSION;
    userInfo.userID = userID;
    userInfo.loginname = loginname;
    userInfo.platformID = SppaConstant.ANDROID;
    userInfo.udid = SppaConstant.getDeviceInfo(ActRegisterSucceed.this);

    String url =
        "http://testinterface.8518.com/app/ceb/payaccounts.php?"
            + "&userID="
            + userInfo.userID
            + "&platformID="
            + userInfo.platformID
            + "&version="
            + userInfo.version
            + "&signature="
            + userInfo.signature
            + "&loginname="
            + userInfo.loginname
            + "&udid="
            + userInfo.udid;

    return url;
  }
示例#2
0
  void getAccountCenter() {
    sp = getSharedPreferences("USERID", 0);
    userID = sp.getString("userID", "0");

    String signature = "accountcenter.php:" + System.currentTimeMillis() / 1000 + ":hxpay";
    UserInfo userInfo = new UserInfo();
    try {
      userInfo.signature =
          RegExpValidator.encodeBase64(
              UtiEncrypt.encryptAES(RegExpValidator.encodeBase64(signature.getBytes())).getBytes());
    } catch (Exception e) {
      e.printStackTrace();
    }
    userInfo.version = SppaConstant.APP_VERSION;
    userInfo.userID = userID;
    userInfo.platformID = SppaConstant.ANDROID;
    userInfo.udid = SppaConstant.getDeviceInfo(this);

    new AccountCenterTask().execute(userInfo);
  }
示例#3
0
  void share() {
    sp = getSharedPreferences("USERID", 0);
    userID = sp.getString("userID", "0");
    String signature = "sharefriend.php:" + System.currentTimeMillis() / 1000 + ":hxpay";
    UserInfo userInfo = new UserInfo();
    try {
      userInfo.signature =
          RegExpValidator.encodeBase64(
              UtiEncrypt.encryptAES(RegExpValidator.encodeBase64(signature.getBytes())).getBytes());
    } catch (Exception e) {
      e.printStackTrace();
    }
    userInfo.type = "0"; // 注册分享
    userInfo.version = SppaConstant.APP_VERSION;
    userInfo.userID = userID;
    userInfo.platformID = SppaConstant.ANDROID;
    userInfo.udid = SppaConstant.getDeviceInfo(this);

    if (SppaConstant.isNetworkAvailable(this)) {
      new ShareTask().execute(userInfo);
    }
  }