H
huangheng
Unregistered / Unconfirmed
GUEST, unregistred user!
小弟手上只有ASP版本的工行网上支付接口代码,不知道怎么在.NET中使用?
请问谁有.NET版本的工行网上支付接口代码吗?或者帮忙用.NET解释一下我的ASP版本的代码:
<%
mContractNo = session("ContractNo" '订单号
mContractAmt = cdbl(session("ContractAmt"*100) '金额,小数部分为最后两位,不加小数点
if session("shbz" = "0"
or session("shbz" = ""
then
response.redirect "../../../index.asp"
end if
Dim bb,rc
Set bb =CreateObject("ICBCEBANKUTIL.B2CUtil"
//admin.crt 852456
//ebb2cpublic 97654321
rc=bb.init ("c:/windows/system32/ebb2cpublic.crt","c:/windows/system32/User.crt","c:/windows/system32/User.key","852456"
if rc<>0 then
response.write "初始化不成功.<br>"
end if
src = "240300010003"&"http://../BtoB/ICBC/b2c_data.asp"&"HS"&mContractNo&mContractAmt&"001"&"0"
ssrc = bb.signC(src, Len(src))
If ssrc = ""
then
response.write "签名失败,错误原因:<br>"
response.write bb.getRC
End If
cert=bb.getCert(1)
If cert = ""
then
response.write "获取商户证书失败,错误原因:<br>"
response.write bb.getRC
End If
%>
建行或农行的也行!
请问谁有.NET版本的工行网上支付接口代码吗?或者帮忙用.NET解释一下我的ASP版本的代码:
<%
mContractNo = session("ContractNo" '订单号
mContractAmt = cdbl(session("ContractAmt"*100) '金额,小数部分为最后两位,不加小数点
if session("shbz" = "0"
or session("shbz" = ""
then
response.redirect "../../../index.asp"
end if
Dim bb,rc
Set bb =CreateObject("ICBCEBANKUTIL.B2CUtil"
//admin.crt 852456
//ebb2cpublic 97654321
rc=bb.init ("c:/windows/system32/ebb2cpublic.crt","c:/windows/system32/User.crt","c:/windows/system32/User.key","852456"
if rc<>0 then
response.write "初始化不成功.<br>"
end if
src = "240300010003"&"http://../BtoB/ICBC/b2c_data.asp"&"HS"&mContractNo&mContractAmt&"001"&"0"
ssrc = bb.signC(src, Len(src))
If ssrc = ""
then
response.write "签名失败,错误原因:<br>"
response.write bb.getRC
End If
cert=bb.getCert(1)
If cert = ""
then
response.write "获取商户证书失败,错误原因:<br>"
response.write bb.getRC
End If
%>
建行或农行的也行!