예제 #1
0
 // 支付宝充值网络获取
 // 改为线程 2010/7/9陈晨
 private void actoinYin(String amt) {
   RechargePojo rechargepojo = new RechargePojo();
   ;
   rechargepojo.setAmount(amt);
   rechargepojo.setRechargetype("06");
   rechargepojo.setCardtype(YINTYPE);
   recharge(rechargepojo);
 }
  // 支付宝充值
  private void beginAlipayRecharge(View Vi) { // isWebView = false代表浏览器联网
    String zfb_recharge_value_string = accountnum.getText().toString();
    RWSharedPreferences pre = new RWSharedPreferences(AlipaySecureActivity.this, "addInfo");
    String sessionIdStr = pre.getStringValue(ShellRWConstants.SESSIONID);
    phonenum = pre.getStringValue(ShellRWConstants.PHONENUM);

    if (sessionIdStr.equals("") || sessionIdStr == null) {
      Intent intentSession = new Intent(AlipaySecureActivity.this, UserLogin.class);
      startActivity(intentSession);
    } else {
      if (zfb_recharge_value_string.equals("0")) {
        Toast.makeText(this, "不能为0!", Toast.LENGTH_LONG).show();
        return;
      }
      if (zfb_recharge_value_string.equals("") || zfb_recharge_value_string.length() == 0) {
        Toast.makeText(this, "不能为空!", Toast.LENGTH_LONG).show();
      } else {
        // 支付宝充值网络获取
        // 改为线程 2010/7/9陈晨
        RechargePojo rechargepojo = new RechargePojo();
        ;
        rechargepojo.setAmount(zfb_recharge_value_string);
        rechargepojo.setRechargetype("05");
        rechargepojo.setCardtype("0300");

        if (isWebView) {
          rechargepojo.setBankAccount("4"); // 4支付宝wap支付
        } else {
          rechargepojo.setBankAccount("3"); // 3支付宝浏览器支付
        }
        recharge(rechargepojo);
      }
    }
  }