PHP,银联的支付接口怎么调用?
PHP调用银联支付接口
//在工商支付接口之前找到工商银行提供的接口文件级dll文件
//向工行指定页面提供订单签名数据的公钥加密。
//组织要签名的数据字符串
$ src = & quotICBC _ per bank _ B2C 1 . 0 . 0 . 0 & quot;。$ infomer[& quot;梅里德& quot].$ infomer[& quot;meracct & quot].$returnaddress。”HS & quot。$ number美元。美元金额。”0010 & quot。$现在。”0 & gt;;
$ com = new com(& # 39;ICBCEBANKUTIL。B2CUtil & # 39);
$ RC = $ com-& gt;初始化(& quot丙:& # 92;WINDOWS & # 92user.crt & quot,& quot丙:& # 92;WINDOWS & # 92user.crt & quot,& quot丙:& # 92;WINDOWS & # 92用户密钥& quot,& quot11111111 & quot);
$ ssrc = $ com-& gt;signC($src,strlen($ src));//订单签名数据
$ RC = $ com-& gt;verifySignC($src,strlen($src),$ssrc,strlen($ ssrc));
$ cert = $ com-& gt;getCert(1);//商城证书公钥
//将商户证书存储到c:& # 92;WINDOWS目录,然后创建一个表单表单,将指定的数据提交到工行指定的网页。
& lt!-支付宝支付的接口操作,提交数据->:
<td width="100"><a href="<{$link}>"><img src="images/sy_19.gif" width="90" height="25" border="0"></a></td>& lttd宽度= & quot100 & quot& gt& lta href = & quot& lt{ $ link } & gt”& gt& ltimg src = & quotimages/sy _ 19 . gif & quot;width = & quot90 & quotheight = & quot25 & quotborder = & quot0 & gt;& gt& lt/a & gt;& lt/TD & gt;
& lt!-————————————————————& gt;
& lt!-工行支付与提交数据的接口操作->:
& lt表单操作= & quothttps://mybank.icbc.com.cn/"方法= & quot帖子& quotname = & quot表单_银行& quot& gt
& lt输入名称= & quot接口名称& quottype = & quot隐藏& quotvalue = & quotICBC _ PERBANK _ B2C & quot/& gt;
& lt输入名称= & quot界面版本& quottype = & quot隐藏& quotvalue = & quot0 . 0 . 0 & quot;/& gt;
& lt输入名称= & quot订单& quottype = & quot隐藏& quotvalue = & quot& lt{ $ DD $ number } & gt;”/& gt;
& lt输入名称= & quot金额& quottype = & quot隐藏& quotvalue = & quot& lt{ $ amount } & gt”/& gt;
& lt输入名称= & quot简写& quottype = & quot隐藏& quotvalue = & quot001 & quot/& gt;
& lt输入名称= & quot梅里德& quottype = & quot隐藏& quotvalue = & quot& lt{ $ merid } & gt”/& gt;
& lt输入名称= & quotmerAcct & quottype = & quot隐藏& quotvalue = & quot& lt{ $ meracct } & gt”/& gt;
& lt输入名称= & quotverifyJoinFlag & quottype = & quot隐藏& quotvalue = & quot0 & gt;/& gt;
& lt输入名称= & quotnotifyType & quottype = & quot隐藏& quotvalue = & quotHS & quot/& gt;
& lt输入名称= & quotmerURL & quottype = & quot隐藏& quotvalue = & quot& lt{ $ returnaddress } & gt”/& gt;
& lt输入名称= & quot结果类型& quottype = & quot隐藏& quotvalue = & quot0 & gt;/& gt;
& lt输入名称= & quot订单日期& quottype = & quot隐藏& quotvalue = & quot& lt{ $ nowtime } & gt”/& gt;
& lt输入名称= & quotmerSignMsg & quottype = & quot隐藏& quotvalue = & quot& lt{ $ ssrc } & gt”/& gt;
& lt输入名称= & quot美世& quottype = & quot隐藏& quotvalue = & quot& lt{ $ cert } & gt”/& gt;
& lt/form & gt;