cl032 发表于 2016-8-15 11:27:29

录制中如何将密码进行关联参数化

本帖最后由 cl032 于 2016-8-15 11:31 编辑

录制的脚本含有"Name=tradePwd", "Value=Nou0TURJUFrqiTact29NZg==", ENDITEM,    tradePwd如何参数化关联
脚本如下:Action()
{
char *status ="";
web_set_max_html_param_len("10240");
lr_start_transaction("CO");

lr_start_transaction("open_url");
web_url("simulator.html",
"URL=http://{urlIp}:{urlPort}/psfp-test/merchant/simulator.html",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_end_transaction("open_url", LR_AUTO);

lr_start_transaction("payment");
web_submit_form("payment.html;jsessionid=pKJGXtVLVQbQGK8yQgcmFfthR721JPCYrGHFQz1T0WmG4nBPfQ6Q!273223679",
"Snapshot=t2.inf",
ITEMDATA,
"Name=Test_Type", "Value=综合网关", ENDITEM,
"Name=Mer_code", "Value={merCode}", ENDITEM,
"Name=Mer_Name", "Value=测试商户", ENDITEM,
"Name=Mer_acccode", "Value={merAcccode}", ENDITEM,
"Name=Billno", "Value={date}{rand}", ENDITEM,
"Name=Amount", "Value={Amount}", ENDITEM,
"Name=Date", "Value={date_s}", ENDITEM,
"Name=Currency_Type", "Value=人民币", ENDITEM,
"Name=Gateway_Type", "Value=借记卡", ENDITEM,
"Name=Lang", "Value=GB中文", ENDITEM,
"Name=Merchanturl", "Value=http://{urlIp}:{urlPort}/psfp-entry/merchant/success.do", ENDITEM,
"Name=Attach", "Value=this is merchant attach!", ENDITEM,
"Name=OrderEncodeType", "Value=md5摘要", ENDITEM,
"Name=RetEncodeType", "Value=md5摘要", ENDITEM,
"Name=Rettype", "Value=有Server to Server", ENDITEM,
"Name=ServerUrl", "Value=http://{urlIp}:{urlPort}/psfp-entry/merchant/s2surl.do", ENDITEM,
"Name=DoCredit", "Value=非直连", ENDITEM,
"Name=BizType", "Value=普通", ENDITEM,
"Name=PrdType", "Value=个人网银", ENDITEM,
"Name=Bankco", "Value=00095", ENDITEM,
"Name=CommodityName", "Value=三星Galaxy S4", ENDITEM,
"Name=BillEXP", "Value=96", ENDITEM,
"Name=SysCode", "Value=1001", ENDITEM,
"Name=WhoFee", "Value=平台承担", ENDITEM,
"Name=FeeType", "Value=外扣", ENDITEM,
"Name=UserId", "Value=", ENDITEM,
"Name=UserRealName", "Value=", ENDITEM,
"Name=B1", "Value=提交", ENDITEM,
LAST);
lr_end_transaction("payment", LR_AUTO);

web_reg_save_param("ipsBillNo",
"LB=ipsBillNo\" value=\"",
"RB=\" ",
"NotFound=ERROR",
"Search=All",
LAST);
web_reg_save_param("signMD5",
"LB=signMD5\" value=\"",
"RB=\"",
"NotFound=ERROR",
"Search=All",
LAST);

lr_start_transaction("payment1");
web_submit_form("payment.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/gateway/payment.do",
"Snapshot=t3.inf",
ITEMDATA,
LAST);
lr_end_transaction("payment1", LR_AUTO);

lr_start_transaction("prelogin");
web_submit_form("prelogin.do",
"Action=coll/prelogin.do",
"Snapshot=t4.inf",
ITEMDATA,
EXTRARES,
"Url=/psfp-entry/images/coll/down.png", ENDITEM,
"Url=/psfp-entry/images/coll/loading.gif", ENDITEM,
LAST);
lr_end_transaction("prelogin", LR_AUTO);

lr_start_transaction("toLoginContainerNL");
web_url("toLoginContainerNL.do",
"URL=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/toLoginContainerNL.do",
"Resource=0",
"RecContentType=text/html",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/prelogin.do",
"Snapshot=t5.inf",
"Mode=HTML",
LAST);
lr_end_transaction("toLoginContainerNL", LR_AUTO);
/* web_reg_save_param("pwdResult",
"LB=pwdResult\":\"",
"RB=\"",
"Search=All",
LAST);*/

lr_start_transaction("userLogin");
web_submit_data("userLogin.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/userLogin.do",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/prelogin.do",
"Snapshot=t6.inf",
"Mode=HTML",
ITEMDATA,
"Name=userName", "Value={userName}", ENDITEM,
      "Name=pwdResult", "Value=0X2y/LTcfJdx7F5gvcqnkg==", ENDITEM,
"Name=ver", "Value=验证码", ENDITEM,
"Name=ordBillNo", "Value={ipsBillNo}", ENDITEM,
"Name=needVer", "Value=false", ENDITEM,
LAST);
lr_end_transaction("userLogin", LR_AUTO);

lr_start_transaction("doLogin_CK");
web_submit_data("doLogin_CK.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/doLogin_CK.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/prelogin.do",
"Snapshot=t7.inf",
"Mode=HTML",
ITEMDATA,
"Name=bankCode", "Value=", ENDITEM,
"Name=bankName", "Value=", ENDITEM,
"Name=bankType", "Value=", ENDITEM,
"Name=action", "Value=", ENDITEM,
"Name=ipsBillNo", "Value={ipsBillNo}", ENDITEM,
"Name=ordAmt", "Value={Amount}", ENDITEM,
"Name=merName", "Value=测试商户名称", ENDITEM,
"Name=gatewayType", "Value=01", ENDITEM,
"Name=signMD5", "Value={signMD5}", ENDITEM,
"Name=orderEncodeType", "Value=5", ENDITEM,
"Name=retEncodeType", "Value=17", ENDITEM,
"Name=rettype", "Value=1", ENDITEM,
"Name=merAcccode", "Value={merAcccode}", ENDITEM,
"Name=merCode", "Value={merCode}", ENDITEM,
"Name=accName", "Value=", ENDITEM,
"Name=curBal", "Value=", ENDITEM,
"Name=amount", "Value={Amount}", ENDITEM,
"Name=merchantUrl", "Value=http://{urlIp}:{urlPort}/psfp-entry/merchant/success.do", ENDITEM,
"Name=failUrl", "Value=null", ENDITEM,
"Name=serverUrl", "Value=http://{urlIp}:{urlPort}/psfp-entry/merchant/s2surl.do", ENDITEM,
"Name=billno", "Value={date}{rand}", ENDITEM,
"Name=subPrdCode", "Value=", ENDITEM,
"Name=currencyType", "Value=156", ENDITEM,
"Name=date", "Value={date_s}", ENDITEM,
"Name=attach", "Value=this is merchant attach!", ENDITEM,
"Name=commodityName", "Value=三星Galaxy S4", ENDITEM,
"Name=userRechargeFee", "Value=", ENDITEM,
"Name=sysCode", "Value=1001", ENDITEM,
"Name=kpType", "Value=", ENDITEM,
"Name=merBillIp", "Value=192.168.12.251", ENDITEM,
"Name=ordBillNo", "Value=", ENDITEM,
"Name=signStatus", "Value=", ENDITEM,
"Name=tradeStatus", "Value=", ENDITEM,
"Name=signNo", "Value=", ENDITEM,
"Name=errorMsg", "Value=", ENDITEM,
"Name=loginPhone", "Value=", ENDITEM,
EXTRARES,
"Url=/psfp-entry/images/coll/btn_close.png", ENDITEM,
"Url=/psfp-entry/coll/js/jquery-1.10.2.js?_=1470993829569", ENDITEM,
"Url=/psfp-entry/coll/js/jquery-1.10.2.min.js?_=1470993829570", ENDITEM,
"Url=/psfp-entry/coll/js/jquery.showLoading.min.js?_=1470993829571", ENDITEM,
"Url=/psfp-entry/coll/js/bootstrap.js?_=1470993829572", ENDITEM,
"Url=/psfp-entry/coll/js/bootstrap.min.js?_=1470993829573", ENDITEM,
"Url=/psfp-entry/coll/js/boxshow.js?_=1470993829574", ENDITEM,
"Url=/psfp-entry/coll/js/index.js?_=1470993829575", ENDITEM,
"Url=/psfp-entry/coll/js/PassGuardCtrl.js?_=1470993829576", ENDITEM,
"Url=/psfp-entry/images/coll/banklist.png", ENDITEM,
"Url=http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/fonts/fontawesome-webfont.eot?", ENDITEM,
LAST);
lr_end_transaction("doLogin_CK", LR_AUTO);
//关联订单号
//web_reg_save_param("bankBillno",
//   "LB=bankBillno\" value=\"",
//   "RB=\"",
//   "Ord=1",
//   LAST);
//关联订单号
//web_reg_save_param("IpsTradeNo",
//   "LB=IpsTradeNo\" value=\"",
//   "RB=\"",
//   "Ord=1",
//   LAST);

web_submit_data("toPayment_CK.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/payment/toPayment_CK.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/doLogin_CK.do",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=isAll", "Value=0", ENDITEM,
"Name=ipsBillNo", "Value={ipsBillNo}", ENDITEM,
"Name=merName", "Value=测试商户名称", ENDITEM,
LAST);

web_submit_data("confirmPay_CK.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/payment/confirmPay_CK.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/doLogin_CK.do",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=tradePwd", "Value=Nou0TURJUFrqiTact29NZg==", ENDITEM,
"Name=orderNo", "Value={ipsBillNo}", ENDITEM,
"Name=collId[]", "Value=MR20160812164215001194", ENDITEM,
"Name=tranAmt", "Value={Amount}", ENDITEM,
"Name=merAcccode", "Value={merAcccode}", ENDITEM,
"Name=ipsBillNo", "Value={ipsBillNo}", ENDITEM,
"Name=merName", "Value=测试商户名称", ENDITEM,
LAST);

web_submit_data("success.do",
"Action=http://{urlIp}:{urlPort}/psfp-entry/merchant/success.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{urlIp}:{urlPort}/psfp-entry/gateway/coll/doLogin_CK.do",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=paymentResult", "Value=<Ips><GateWayRsp><head><ReferenceID></ReferenceID><RspCode>000000</RspCode><RspMsg><!]></RspMsg><ReqDate>{date1}</ReqDate><RspDate>{date2}</RspDate><Signature>8063a3877997efa026bea0b9d9e882a1</Signature></head><body><MerBillNo>{date}{rand}</MerBillNo><CurrencyType>156</CurrencyType><Amount>1</Amount><Date>{date_s}</Date><Status>Y</Status><Msg><!]></Msg><Attach><!]></Attach><IpsBillNo"
">{ipsBillNo}</IpsBillNo><IpsTradeNo>{IpsTradeNo}</IpsTradeNo><RetEncodeType>17</RetEncodeType><BankBillNo>{BankBillNo}</BankBillNo><ResultType>0</ResultType><IpsBillTime>{date1}</IpsBillTime></body></GateWayRsp></Ips>", ENDITEM,
EXTRARES,
"Url=../images/icon_success.png", ENDITEM,
"Url=../images/logo.png", ENDITEM,
LAST);
status ="{v_status}";
if (strcmp(status,"这是模拟商户成功的消息")) {
lr_end_transaction("CO", LR_PASS);
}else{
lr_end_transaction("CO", LR_FAIL);
}
return 0;
}

梦想家 发表于 2016-8-15 14:29:22

这个是什么 软件呀 你先说 软件名字 再说 问问题呀!直接粘代码,怎么看

seagull1985 发表于 2016-8-15 14:49:40

跟用户名一起关联就是啦。。。
页: [1]
查看完整版本: 录制中如何将密码进行关联参数化