<!--#include file="wxpay.Api.asp" -->
<% 
body=request("body")
attach=request("attach")
total_fee=request("total_fee")
product_id=1
response.Write getcode(body,attach,total_fee,product_id)

function getcode(body,attach,total_fee,product_id)
 set wxpay = New WxPayApi
   out_trade_no = wxpay.GetDateTime
    wxpay.setParameter "body",body
	wxpay.setParameter "out_trade_no",out_trade_no
	wxpay.setParameter "attach",attach
	wxpay.setParameter "total_fee",(total_fee)*100
	wxpay.setParameter "trade_type","NATIVE"
	wxpay.setParameter "spbill_create_ip","127.0.0.1"
	wxpay.setParameter "notify_url",NOTIFY_URL
	wxpay.setParameter "product_id", product_id
	wxpay.setParameter "device_info","WEB"
    code_url = wxpay.Get_code_url
	prepay_id = wxpay.Get_prepay_id
	getcode=code_url & "|" &prepay_id

set wxpay = Nothing
end function
 %>
