📄 payreturn.vb
字号:
Imports hi_shop.NET.check
Imports hi_shop.NET.shop
Imports System
Imports System.IO
Imports System.Net
Imports System.Security.Cryptography
Imports System.Text
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Namespace hi_shop.NET
Public Class payreturn
Inherits Page
' Methods
Public Sub New()
Me.defaultreturnurl = "usermanage_order.aspx"
Me.message = "ok"
Me.orderid = String.Empty
End Sub
Private Sub alipay()
Dim text1 As String = Me.myshop.fantionGetvalue("select card from hishop_paymentmode where type=18 and visible=1")
Dim text2 As String = Me.myshop.fantionGetvalue("select dizhi from hishop_paymentmode where type=18 and visible=1")
Dim text3 As String = "N"
If (Not text1 Is "err") Then
Dim text4 As String = Me.mycheck.hishoppass_creatDNPASS(text1)
Dim text5 As String = String.Empty
Dim text6 As String = String.Empty
Dim text7 As String = String.Empty
Dim text8 As String = String.Empty
Dim text9 As String = String.Empty
Dim text10 As String = String.Empty
Dim text11 As String = String.Empty
Dim text12 As String = String.Empty
Dim text13 As String = String.Empty
Dim text14 As String = String.Empty
Dim text15 As String = String.Empty
Dim text16 As String = String.Empty
Dim text17 As String = String.Empty
Dim text19 As String = "N"
Dim text18 As String = "http://notify.alipay.com/trade/notify_query.do?"
If (Not MyBase.Request.Item("msg_id") Is Nothing) Then
text5 = MyBase.Request.Item("msg_id")
End If
If (Not MyBase.Request.Item("order_no") Is Nothing) Then
text6 = MyBase.Request.Item("order_no")
Me.orderid = text6
End If
If (Not MyBase.Request.Item("gross") Is Nothing) Then
text7 = MyBase.Request.Item("gross")
End If
If (Not MyBase.Request.Item("buyer_email") Is Nothing) Then
text8 = MyBase.Request.Item("buyer_email")
End If
If (Not MyBase.Request.Item("buyer_name") Is Nothing) Then
text9 = MyBase.Request.Item("buyer_name")
End If
If (Not MyBase.Request.Item("buyer_address") Is Nothing) Then
text10 = MyBase.Request.Item("buyer_address")
End If
If (Not MyBase.Request.Item("buyer_zipcode") Is Nothing) Then
text11 = MyBase.Request.Item("buyer_zipcode")
End If
If (Not MyBase.Request.Item("buyer_tel") Is Nothing) Then
text12 = MyBase.Request.Item("buyer_tel")
End If
If (Not MyBase.Request.Item("buyer_mobile") Is Nothing) Then
text13 = MyBase.Request.Item("buyer_mobile")
End If
If (Not MyBase.Request.Item("action") Is Nothing) Then
text14 = MyBase.Request.Item("action")
End If
If (Not MyBase.Request.Item("date") Is Nothing) Then
text15 = MyBase.Request.Item("date")
End If
If (Not MyBase.Request.Item("ac") Is Nothing) Then
text16 = MyBase.Request.Item("ac")
End If
If (Not MyBase.Request.Item("notify_type") Is Nothing) Then
text17 = MyBase.Request.Item("notify_type")
End If
text18 = String.Concat(New String() { text18, "msg_id=", text5, "&email=", text2, "&order_no=", text6 })
Dim reader1 As StreamReader = Nothing
Dim response1 As HttpWebResponse = Nothing
Try
Dim request1 As HttpWebRequest = DirectCast(WebRequest.Create(text18), HttpWebRequest)
request1.Method = "GET"
response1 = DirectCast(request1.GetResponse, HttpWebResponse)
Dim encoding1 As Encoding = Encoding.GetEncoding("gb2312")
reader1 = New StreamReader(response1.GetResponseStream, encoding1)
text19 = reader1.ReadToEnd
If (text17 Is "web") Then
text19 = "true"
End If
Select Case text14
Case "test"
text3 = "Y"
goto Label_05DB
Case "sendOff"
If (((text19 Is "true") AndAlso (Not text7 Is String.Empty)) AndAlso ((Not Me.orderid Is String.Empty) AndAlso hishopcheck.hishopcheck_isnum(Me.orderid))) Then
If Me.mycheck.hishoppass_veriftOrderMoney(Me.orderid, Decimal.Parse(text7)) Then
Try
If (Not text17 Is "web") Then
Me.myorder.hishop_set_orderstat(Me.orderid, 2!)
End If
Me.message = ChrW(25903) & ChrW(20184) & ChrW(25104) & ChrW(21151) & "!"
text3 = "Y"
Catch obj1 As Object
Me.message = ChrW(25903) & ChrW(20184) & ChrW(22833) & ChrW(36133) & ".."
End Try
goto Label_05DB
End If
Me.message = ChrW(35746) & ChrW(21333) & ChrW(37329) & ChrW(39069) & ChrW(26657) & ChrW(39564) & ChrW(38169) & ChrW(35823)
goto Label_05DB
End If
Me.message = ChrW(25903) & ChrW(20184) & ChrW(25104) & ChrW(21151) & "."
goto Label_05DB
End Select
If (text14 Is "checkOut") Then
If ((((text19 Is "true") AndAlso (Not text7 Is String.Empty)) AndAlso (hishopcheck.hishopcheck_isdouble(text7) AndAlso (Not Me.orderid Is String.Empty))) AndAlso hishopcheck.hishopcheck_isnum(Me.orderid)) Then
If Me.mycheck.hishoppass_veriftOrderMoney(Me.orderid, Decimal.Parse(text7)) Then
Try
If (Decimal.Parse(Me.myshop.fantionGetvalue(("select state from hishop_order where id=" & Me.orderid))) = New Decimal(0)) Then
If (Not text17 Is "web") Then
Me.myorder.hishop_set_orderstat(Me.orderid, 2!)
End If
ElseIf (Not text17 Is "web") Then
Me.myorder.hishop_set_orderstat(Me.orderid, 4!)
End If
text3 = "Y"
Me.message = ChrW(25903) & ChrW(20184) & ChrW(25104) & ChrW(21151) & "!"
Catch obj2 As Object
Me.message = ChrW(25913) & ChrW(21464) & ChrW(35746) & ChrW(21333) & ChrW(29366) & ChrW(24577) & ChrW(26102) & ChrW(20986) & ChrW(38169)
End Try
Else
Me.message = ChrW(35746) & ChrW(21333) & ChrW(37329) & ChrW(39069) & ChrW(26657) & ChrW(39564) & ChrW(38169) & ChrW(35823)
End If
Else
Me.message = String.Concat(New String() { ChrW(21040) & ChrW(26381) & ChrW(21153) & ChrW(22120) & ChrW(26657) & ChrW(39564) & ChrW(38169) & ChrW(35823) & ChrW(65292) & ChrW(36820) & ChrW(22238) & ChrW(20449) & ChrW(24687) & ":", text19, "|", text7, "|", Me.orderid })
End If
End If
Catch exception1 As Exception
text3 = "N"
Me.message = (ChrW(25903) & ChrW(20184) & ChrW(22833) & ChrW(36133) & "..." & exception1.Message)
Finally
If (Not response1 Is Nothing) Then
response1.Close
End If
If (Not reader1 Is Nothing) Then
reader1.Close
End If
End Try
Else
text3 = "N"
Me.message = ChrW(26410) & ChrW(25214) & ChrW(21040) & ChrW(24744) & ChrW(30340) & ChrW(25903) & ChrW(20184) & ChrW(23453) & ChrW(25903) & ChrW(20184) & ChrW(26041) & ChrW(24335)
End If
Label_05DB:
If ((Not MyBase.Request.Item("notify_type") Is Nothing) AndAlso (MyBase.Request.Item("notify_type") Is "web")) Then
Return
End If
MyBase.Response.Write(text3)
MyBase.Response.End
End Sub
Private Sub allbuy()
Dim text1 As String = Me.myshop.fantionGetvalue("select card from hishop_paymentmode where type=17 and visible=1")
If (Not text1 Is "err") Then
Dim text2 As String = Me.mycheck.hishoppass_creatDNPASS(text1)
Dim text3 As String = Me.myshop.fantionGetvalue("select dizhi from hishop_paymentmode where type=17 and visible=1")
Dim text4 As String = MyBase.Request.Item("amount")
Dim text5 As String = MyBase.Request.Item("billno")
Dim text6 As String = MyBase.Request.Item("success")
Dim text7 As String = MyBase.Request.Item("sign")
Dim text8 As String = String.Concat(New String() { text3, text5, text4, text6, text2 })
Dim text9 As String = FormsAuthentication.HashPasswordForStoringInConfigFile(text8, "md5").ToLower
If (text7 Is text9) Then
If (text6 Is "Y") Then
Me.orderid = (Me.myshop.fantionGetvalue("select top 1 id from hishop_order order by id desc").Substring(0, 2) & text5)
If Me.mycheck.hishoppass_veriftOrderMoney(Me.orderid, Decimal.Parse(text4)) Then
Try
Me.myorder.hishop_set_orderstat(Me.orderid, 2!)
Me.message = ChrW(25903) & ChrW(20184) & ChrW(25104) & ChrW(21151) & "!"
Catch obj1 As Object
Me.message = ChrW(23545) & ChrW(23450) & ChrW(21333) & ChrW(36827) & ChrW(34892) & ChrW(31614) & ChrW(21517) & ChrW(22833) & ChrW(36133)
End Try
Dim text10 As String = (String.Empty & "merchant=" & text3)
text10 = (text10 & "&billno=" & text5)
text10 = (text10 & "&amount=" & text4)
text10 = (text10 & "&success=" & text6)
text10 = (text10 & "&remark=" & MyBase.Request.Item("remark"))
text10 = (text10 & "&referno=" & MyBase.Request.Item("referno"))
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -