コード例 #1
0
    @Override
    protected String doInBackground(String... params) {
      // bankNumber:银行卡号 accountNumber:证件号 mobile:手机号码 accountname:用户姓名

      FastpayBean fastpayBean = new FastpayBean();
      fastpayBean.setService("ebatong_mp_unbind");
      fastpayBean.setPartner(Url.Partner);
      fastpayBean.setSign_type("MD5");
      fastpayBean.setInput_charset("UTF-8");
      fastpayBean.setBank_card_no(getIntent().getStringExtra("bankNumber"));
      fastpayBean.setOut_trade_no(billno);
      fastpayBean.setPhone(getIntent().getStringExtra("phone"));
      fastpayBean.setNotify_url("www.hao123.com");
      fastpayBean.setCustomerId(PreferenceUtils.getUserId() + "");
      fastpayBean.setSubject("描述");

      String urlPath = "https://www.ebatong.com/mobileFast/unbind.htm";
      String postJson = fastpayBean.getPostJson();
      Log.i("lyjtest", "getPostJson:" + postJson);
      byte[] data = postJson.getBytes();
      InputStream is = null;
      try {
        is = NetTool.sendXMLData(urlPath, data, "UTF-8");
        data = NetTool.readStream(is);
        Log.i("lyjtest", new String(data));
      } catch (Exception e) {
        e.printStackTrace();
      }

      return new String(data);
    }
コード例 #2
0
    @Override
    protected String doInBackground(String... params) {
      // bankNumber:银行卡号 accountNumber:证件号 mobile:手机号码 accountname:用户姓名

      FastpayBean fastpayBean = new FastpayBean();
      fastpayBean.setService("create_direct_pay_by_mp");
      fastpayBean.setPartner(Url.Partner);
      fastpayBean.setSign_type("MD5");
      fastpayBean.setInput_charset("UTF-8");
      fastpayBean.setBank_card_no(bankid);

      fastpayBean.setCardHolderName(name);

      fastpayBean.setIdType("01");
      fastpayBean.setCardHolderId(idcard);

      fastpayBean.setPhone(phone);
      fastpayBean.setOut_trade_no(params[0]);
      fastpayBean.setTotal_fee(params[3]); // (8,2) 位数至少2位
      fastpayBean.setSign_type("MD5");
      fastpayBean.setNotify_url("www.hao123.com");
      fastpayBean.setToken(params[1]);
      fastpayBean.setValidCode(params[2]);
      fastpayBean.setCustomerId(PreferenceUtils.getUserId() + "");
      fastpayBean.setDefault_bank(bank_code);

      fastpayBean.setExter_invoke_ip("11.11.11.11");
      fastpayBean.setAnti_phishing_key(params[4]);

      fastpayBean.setSubject("txwl");
      fastpayBean.setBody("spms");
      fastpayBean.setShow_url("spzs");
      fastpayBean.setExtend_param("ggcs");
      fastpayBean.setExtra_common_param("hccs");
      fastpayBean.setPay_method("");
      //            fastpayBean.setBankId("CCB");

      String urlPath = "https://www.ebatong.com/mobileFast/pay.htm";
      String postJson = fastpayBean.getPostJson();
      Log.i("lyjtest", "getPostJson:" + postJson);
      byte[] data = postJson.getBytes();
      InputStream is = null;
      try {
        is = NetTool.sendXMLData(urlPath, data, "UTF-8");
        data = NetTool.readStream(is);
        Log.i("lyjtest", new String(data));
      } catch (Exception e) {
        e.printStackTrace();
      }

      return new String(data);
    }