<!--#include file="../../MainClass.asp"-->
<%
dim xmlobj,md5,myString,appid,callback,appkey,mysign,sHtml
SET xmlobj=server.CreateObject("inc_inc_MainClass.xml")
SET md5=server.CreateObject("inc_inc_MainClass.md5")
xmlobj.load "../api.config","xmlfile"
appid=xmlobj.getAttributes("rs:data/z:row","api_alipaypartner",0)
appkey=xmlobj.getAttributes("rs:data/z:row","api_alipaykey",0)
callback=xmlobj.getAttributes("rs:data/z:row","api_alipayreturnurl",0)
Set xmlobj = Nothing
myString="_input_charset=gbk&partner="&appid&"&return_url="&callback&"&service=alipay.auth.authorize&target_service=user.auth.quick.login"&appkey
md5.input_charset="utf-8"
mysign=md5.md5(myString,32)
sHtml="<form id='alipaysubmit' name='alipaysubmit' action='https://mapi.alipay.com/gateway.do?_input_charset=gbk' method='get'>"
sHtml=sHtml&"<input type='hidden' name='_input_charset' value='gbk'/>"
sHtml=sHtml&"<input type='hidden' name='partner' value='"&appid&"'/>"
sHtml=sHtml&"<input type='hidden' name='return_url' value='"&callback&"'/>"
sHtml=sHtml&"<input type='hidden' name='service' value='alipay.auth.authorize'/>"
sHtml=sHtml&"<input type='hidden' name='target_service' value='user.auth.quick.login'/>"
sHtml=sHtml&"<input type='hidden' name='sign' value='"&mysign&"'/>"
sHtml=sHtml&"<input type='hidden' name='sign_type' value='MD5'/>"
sHtml=sHtml&"</form>"
sHtml=sHtml&"<script>document.forms['alipaysubmit'].submit();</"&"script>"
conn.echo sHtml
%>