毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

Android平台模拟移动支付系统设计+源代码(5)

时间:2022-04-24 21:12来源:毕业论文
byte[] responseBody) { hasSend = true; Logger。json(new String(responseBody)); try { BasicResponse response = new BasicResponse( responseBody)。getResult(); if (response。isSuccess()) { btnGetVerif

byte[] responseBody) {

hasSend = true;

Logger。json(new String(responseBody));

try {

BasicResponse response = new BasicResponse(

responseBody)。getResult();

if (response。isSuccess()) {

btnGetVerify。setText("已发送");

;

sms = new SmsCodeCount(60000, 1000);

sms。start();

T。ss("已发送");

} else {

T。ss(response。getMsg());

btnGetVerify。setText("发送失败");

btnGetVerify。setEnabled(true);

}

} catch (JSONException e) {

e。printStackTrace();

}

}

}

获取手机号码、短信验证码数据,调接口传给后台验证短信验证码是否正确。

private void checkVerifyCode() {

HashMap<String, String> map = new HashMap<String, String>();

map。put("custMobile", etPhone。getText()。toString()。trim());

map。put("msgCode", etphoneVerify。getText()。toString());

if (action。equals(ACTION_FORGET_LOGIN_PWD)) {

map。put("codeType", "02");

map。put("custId", User。uId);

} else if (action。equals(ACTION_FORGET_PAY_PWD)) {

map。put("codeType", "03");

map。put("custId", User。uId);

} else {

map。put("codeType", "01");

}

MyHttpClient。postWithoutDefault(this, Urls。CHECK_VERIFY, map,

new JsonHttpResponseHandler() {

@Override

public void onSuccess(int statusCode, Header[] headers,

JSONObject response) {

super。onSuccess(statusCode, headers, response);

Logger。json(response。toString());

try {

JSONObject obj = response。getJSONObject("REP_BODY");

if (obj。getString(来:自[优.尔]论,文-网www.youerw.com +QQ752018766-

com。lk。td。pay。beans。Entity。RSP_COD)。equals(

com。lk。td。pay。beans。Entity。RSP_SUCC)) {

gotoNext();

finish();

} else {

T。sl("" + obj。optString("RSPMSG"));

}

} catch (JSONException e) {

e。printStackTrace();

}

}

}

验证码正确后跳转到设置登录密码页面,并传数据给后台保存信息。

Android平台模拟移动支付系统设计+源代码(5):http://www.youerw.com/jisuanji/lunwen_93112.html
------分隔线----------------------------
推荐内容