Fast payment Module

Source: Internet
Author: User

Send. asp

<! -- # Include file = "md5.asp" -->
<%
'''''''''
'@ Description: quick money gateway interface Example
'@ Copyright (c) Shanghai quickmoney Information Service Co., Ltd.
'@ Version 2.0
'''''''''
Merchant_id = "879905060103109788" ''' merchant ID
Merchant_key = "99 billkeyfortest" ''' merchant key
Orderid = "0226001" ''' Order Number
Amount = "0.02" ''' order amount
Curr = "1" ''' currency type, 1 is RMB
Issupportdes = "2" ''' whether security verification is performed. 2 is required. Recommended

Merchant_url = "" ''' return address of the payment result
Pname = "" ''' name of the payer
Commodity_info = "" ''' item information
Merchant_param = "" ''' merchant private Parameters

Pemail = "" ''' send email to the quickmoney gateway page
PID = "" ''' proxy/partner merchant ID

''' To generate the encryption string. Pay attention to the order
Scrtstr = "merchant_id =" & merchant_id & "& orderid =" & orderid & "& amount =" & amount & "& merchant_url =" & merchant_url & "& merchant_key =" & merchant_key
MAC = ucase (MD5 (scrtstr ))

%>

<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> fast money 99 Bill </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">
</Head>

<Body>

<Div align = "center">
<Table width = "259" border = "0" cellpadding = "1" cellspacing = "1" bgcolor = "# cccccc">
<Tr bgcolor = "# ffffff">
<TD width = "68"> Order No.: </TD>
<TD width = "182"> <% = orderid %> </TD>
</Tr>
<Tr bgcolor = "# ffffff">
<TD> order amount: </TD>
<TD> <% = Amount %> </TD>
</Tr>
<Tr bgcolor = "# ffffff">
<TD> Payer: </TD>
<TD> <% = pname %> </TD>
</Tr>
<Tr bgcolor = "# ffffff">
<TD> product name: </TD>
<TD> <% = commodity_info %> </TD>
</Tr>
<Tr>
<TD> </TD>
</Tr>
</Table>
</Div>

<Div align = "center" style = "font-size = 12px; font-weight: bold; color = Red;">
<Form name = "frm" method = "Post" Action = "https://www.99bill.com/webapp/receiveMerchantInfoAction.do">
<Input name = "merchant_id" type = "hidden" value = "<% = merchant_id %>">
<Input name = "orderid" type = "hidden" value = "<% = orderid %>">
<Input name = "amount" type = "hidden" value = "<% = Amount %>">
<Input name = "currency" type = "hidden" value = "<% = curr %>">
<Input name = "issupportdes" type = "hidden" value = "<% = issupportdes %>">
<Input name = "Mac" type = "hidden" value = "<% = Mac %>">

<Input name = "merchant_url" type = "hidden" value = "<% = merchant_url %>">
<Input name = "pname" type = "hidden" value = "<% = pname %>">
<Input name = "commodity_info" type = "hidden" value = "<% = commodity_info %>">
<Input name = "merchant_param" type = "hidden" value = "<% = merchant_param %>">

<Input name = "pemail" type = "hidden" value = "<% = pemail %>">
<Input name = "PID" type = "hidden" value = "<% = PID %>">

<Input name = "payby99bill" type = "image" src = "../about99bill/button/button_99bill_tj1.gif" value = "quick payment">
</Form>
You can pay by bank card, quick money account, bank, or post office remittance. You can also take part in point redemption activities! <A href = "http://www.99bill.com/index/hd/99bill_hd2.html" target = "_ blank" class = "font-size: 12px;"> & gt; click Details </a>
</Div>

</Body>
</Html>

Receive. asp

<! -- # Include file = "md5.asp" -->
<%
'''''''''
'@ Description: quick money gateway interface Example
'@ Copyright (c) Shanghai quickmoney Information Service Co., Ltd.
'@ Version 2.0
'''''''''
Merchant_key = "99 billkeyfortest" ''' merchant key

Merchant_id = request ("merchant_id") ''' get the merchant ID
Orderid = request ("orderid") ''' get the order number
Amount = request ("amount") ''' get the order amount
Dealdate = request ("date") ''' get the transaction date
Succeed = request ("succeed") ''' gets the transaction result. y succeeds, N fails.
MAC = request ("Mac") ''' get the security encryption string
Merchant_param = request ("merchant_param") ''' get the merchant's private Parameters

Couponid = request ("couponid") ''' get coupon code
Couponvalue = request ("couponvalue") ''' get Coupon denomination

''' To generate the encryption string. Pay attention to the order
Scrtstr = "merchant_id =" & merchant_id & "& orderid =" & orderid & "& amount =" & amount & "& date =" & dealdate & "& succeed =" & succeed & "& merchant_key =" & merchant_key
Mymac = MD5 (scrtstr)

V_result = "failed"
If ucase (MAC) = ucase (mymac) then

If succeed = "Y" then ''' payment successful

V_result = "successful"
'''
''' # Merchant website logic processing #
'''

Else ''' payment failed

End if

Else ''' signature Error

End if

%>
<! Doctype HTML public "-// W3C // dtd html 4.0 transitional // en">
<HTML>
<Head>
<Title> fast money 99 Bill </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
</Head>

<Body>

<Div align = "center">
<Table width = "259" border = "0" cellpadding = "1" cellspacing = "1" bgcolor = "# cccccc">
<Tr bgcolor = "# ffffff">
<TD width = "68"> Order No.: </TD>
<TD width = "182"> <% = orderid %> </TD>
</Tr>
<Tr bgcolor = "# ffffff">
<TD> order amount: </TD>
<TD> <% = Amount %> </TD>
</Tr>
<Tr bgcolor = "# ffffff">
<TD> payment result: </TD>
<TD> <% = v_result %> </TD>
</Tr>
</Table>
</Div>

</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.