直接转过来的,支付流程自己套用进去调试
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>