首页 新闻 搜索 专区 学院

交通银行B2C网上支付

0
悬赏园豆:10 [已解决问题] 解决于 2010-12-01 15:06

有没有.net 版本,asp我看不懂·······

谢谢

东宫有喜的主页 东宫有喜 | 初学一级 | 园豆:3
提问于:2010-11-17 15:38
< >
分享
最佳答案
0

直接转过来的,支付流程自己套用进去调试

C#

using B2CCLIENTCOMCTRLLib;

public string interfaceVersion, merID, orderid, orderDate, orderTime, tranType, amount, curType, orderContent, orderMono,
phdFlag, notifyType, merURL, goodsURL, jumpSeconds, payBatchNo, proxyMerName, proxyMerType, proxyMerCredentials, netType, signData;
int ret;
public string sourceMsg, urlpost;
protected void Page_Load(object sender, EventArgs e)
{
interfaceVersion
= Request["interfaceVersion"];
orderid
= Request["orderid"];
orderDate
= Request["orderDate"];
orderTime
= Request["orderTime"];
tranType
= Request["tranType"];
amount
= Request["amount"];
curType
= Request["curType"];
orderContent
= Request["orderContent"];
orderMono
= Request["orderMono"];
phdFlag
= Request["phdFlag"];
notifyType
= Request["notifyType"];
merURL
= Request["merURL"];
goodsURL
= Request["goodsURL"];
jumpSeconds
= Request["jumpSeconds"];
payBatchNo
= Request["payBatchNo"];
proxyMerName
= Request["proxyMerName"];
proxyMerType
= Request["proxyMerType"];
proxyMerCredentials
= Request["proxyMerCredentials"];
netType
= Request["netType"];

B2CCLIENTCOMCTRLLib.B2CClientCOM B2CAPIATL
= new B2CCLIENTCOMCTRLLib.B2CClientCOM();
ret
= B2CAPIATL.Initialize(@"C:\bocomm\ini\B2CMerchant.xml");
urlpost
= B2CAPIATL.GetOrderReqURL();
merID
= B2CAPIATL.GetMerchantID();
sourceMsg
= interfaceVersion;
sourceMsg
+= "|";
sourceMsg
+= merID;
sourceMsg
+= "|";
sourceMsg
+= orderid;
sourceMsg
+= "|";
sourceMsg
+= orderDate;
sourceMsg
+= "|";
sourceMsg
+= orderTime;
sourceMsg
+= "|";
sourceMsg
+= tranType;
sourceMsg
+= "|";
sourceMsg
+= amount;
sourceMsg
+= "|";
sourceMsg
+= curType;
sourceMsg
+= "|";
sourceMsg
+= orderContent;
sourceMsg
+= "|";
sourceMsg
+= orderMono;
sourceMsg
+= "|";
sourceMsg
+= phdFlag;
sourceMsg
+= "|";
sourceMsg
+= notifyType;
sourceMsg
+= "|";
sourceMsg
+= merURL;
sourceMsg
+= "|";
sourceMsg
+= goodsURL;
sourceMsg
+= "|";
sourceMsg
+= jumpSeconds;
sourceMsg
+= "|";
sourceMsg
+= payBatchNo;
sourceMsg
+= "|";
sourceMsg
+= proxyMerName;
sourceMsg
+= "|";
sourceMsg
+= proxyMerType;
sourceMsg
+= "|";
sourceMsg
+= proxyMerCredentials;
sourceMsg
+= "|";
sourceMsg
+= netType;

signData
= B2CAPIATL.Sign_detachsign(sourceMsg);

 

html

<body bgcolor="#FFFFFF" text="#000000" onload="document.getElementById('form1').submit();">
<form id="form1" method="post" action="<%=urlpost %>">
<input type="hidden" name="interfaceVersion" value="<%=interfaceVersion %>" />
<input type="hidden" name="merID" value="<%=merID %>" />
<input type="hidden" name="orderid" value="<%=orderid%>" />
<input type="hidden" name="orderDate" value="<%=orderDate%>" />
<input type="hidden" name="orderTime" value="<%=orderTime%>" />
<input type="hidden" name="tranType" value="<%=tranType%>" />
<input type="hidden" name="amount" value="<%=amount%>" />
<input type="hidden" name="curType" value="<%=curType%>" />
<input type="hidden" name="orderContent" value="<%=orderContent%>" />
<input type="hidden" name="orderMono" value="<%=orderMono%>" />
<input type="hidden" name="phdFlag" value="<%=phdFlag%>" />
<input type="hidden" name="notifyType" value="<%=notifyType%>" />
<input type="hidden" name="merURL" value="<%=merURL%>" />
<input type="hidden" name="goodsURL" value="<%=goodsURL%>" />
<input type="hidden" name="jumpSeconds" value="<%=jumpSeconds%>" />
<input type="hidden" name="payBatchNo" value="<%=payBatchNo%>" />
<input type="hidden" name="proxyMerName" value="<%=proxyMerName%>" />
<input type="hidden" name="proxyMerType" value="<%=proxyMerType%>" />
<input type="hidden" name="proxyMerCredentials" value="<%=proxyMerCredentials%>" />
<input type="hidden" name="netType" value="<%=netType%>" />
<input type="hidden" name="merSignMsg" value="<%=signData%>" />
</form>
</body>
收获园豆:10
三桂 | 老鸟四级 |园豆:3565 | 2010-11-17 16:51
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册