📄 paysend.vb
字号:
Imports hi_shop.NET
Imports hi_shop.NET.check
Imports hi_shop.NET.shop
Imports System
Imports System.Security.Cryptography
Imports System.Text
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Namespace hi_shop.NET.Newindex
Public Class paysend
Inherits UserControl
' Methods
Private Sub advancepay(ByVal userinfo As String(), ByVal orderinfo As String(), ByVal payinfo As String(), ByVal orderid As String)
Dim hishopcheck1 As New hishopcheck
Dim text1 As String = ChrW(25903) & ChrW(20184) & ChrW(25104) & ChrW(21151)
Try
Dim num1 As Decimal = hishopcheck1.hishoppass_getUserAdvance(userinfo(8))
Dim num2 As Decimal = Decimal.Parse(orderinfo(3))
If (num1 < num2) Then
If (num1 <= New Decimal(0)) Then
text1 = ChrW(24744) & ChrW(23578) & ChrW(26080) & ChrW(39044) & ChrW(20184) & ChrW(27454) & "," & ChrW(35831) & ChrW(20805) & ChrW(20540) & ChrW(21518) & ChrW(20877) & ChrW(23581) & ChrW(35797) & ChrW(25903) & ChrW(20184)
Else
text1 = ChrW(24744) & ChrW(30340) & ChrW(39044) & ChrW(20184) & ChrW(27454) & ChrW(19981) & ChrW(36275) & ChrW(20197) & ChrW(25903) & ChrW(20184) & ChrW(24403) & ChrW(21069) & ChrW(35746) & ChrW(21333) & ChrW(12290)
End If
Else
New hishoporder.hishop_set_orderstat(orderid, 2!)
End If
Catch obj1 As Object
text1 = ChrW(25903) & ChrW(20184) & ChrW(26102) & ChrW(20986) & ChrW(29616) & ChrW(26410) & ChrW(30693) & ChrW(38169) & ChrW(35823)
End Try
MyBase.Response.Write(hishopcheck.hishop_JS_Isok_Gotouri(text1, ("vieworder.aspx?orderid=" & orderid)))
End Sub
Private Sub cncard(ByVal userinfo As String(), ByVal orderinfo As String(), ByVal payinfo As String(), ByVal orderid As String)
Dim text1 As String = DateTime.Parse(orderinfo(4)).ToString("yyyyMMdd")
Me.systemurl = Me.systemurl.Replace("paysend.aspx", "payreturn.aspx")
Dim textArray1 As String() = New String() { payinfo(2), orderid, Double.Parse(orderinfo(3)).ToString("f2"), text1, "01", Me.systemurl, "cncard", Me.thekey }
Dim text2 As String = String.Concat(textArray1)
Dim text3 As String = FormsAuthentication.HashPasswordForStoringInConfigFile(text2, "md5")
Dim text4 As String = ("<form method='post' action='" & payinfo(3) & "' name='post'>")
text4 = (text4 & "<input type='hidden' name='c_orderamount' value='" & Double.Parse(orderinfo(3)).ToString("f2") & "'>")
text4 = (text4 & "<input type='hidden' name='c_ymd' value='" & text1 & "'>")
text4 = (text4 & "<input type='hidden' name='c_moneytype' value='0'>")
text4 = (text4 & "<input type='hidden' name='c_retflag' value='1'>")
text4 = (text4 & "<input type='hidden' name='c_email' value='" & userinfo(7) & "'>")
text4 = (text4 & "<input type='hidden' name='c_address' value='" & userinfo(4) & "'>")
text4 = (text4 & "<input type='hidden' name='c_name' value='" & userinfo(0) & "'>")
text4 = (text4 & "<input type='hidden' name='c_order' value='" & orderid & "'>")
text4 = (text4 & "<input type='hidden' name='c_mid' value='" & payinfo(2) & "'>")
text4 = (text4 & "<input type='hidden' name='c_signstr' value='" & text3.ToLower & "'>")
text4 = (text4 & "<input type='hidden' name='c_returl' value='" & Me.systemurl & "'>")
text4 = (text4 & "<input type='hidden' name='c_memo1' value='cncard'>")
text4 = (text4 & "<input type='hidden' name='c_memo2' value=''>")
text4 = (text4 & "<input type='hidden' name='c_paygate' value=''>")
text4 = (text4 & "<input type='hidden' name='c_post' value=''>")
text4 = (text4 & "<input type='hidden' name='c_tel' value=''>")
text4 = (text4 & "<input TYPE='submit' VALUE='" & ChrW(28857) & ChrW(20987) & ChrW(36827) & ChrW(20837) & ChrW(20113) & ChrW(32593) & ChrW(22312) & ChrW(32447) & ChrW(25903) & ChrW(20184) & ChrW(24179) & ChrW(21488) & "'>")
text4 = (text4 & "</form>")
HttpContext.Current.Response.ContentEncoding = Encoding.GetEncoding("gb2312")
Me.gotopay.Text = text4
End Sub
Public Function GetMD5(ByVal s As String) As String
Dim buffer1 As Byte() = New MD5CryptoServiceProvider.ComputeHash(Encoding.GetEncoding("gb2312").GetBytes(s))
Dim builder1 As New StringBuilder(32)
Dim num1 As Integer = 0
Do While (num1 < buffer1.Length)
builder1.Append(buffer1(num1).ToString("x").PadLeft(2, "0"c))
num1 += 1
Loop
Return builder1.ToString
End Function
Private Sub InitializeComponent()
AddHandler MyBase.Load, New EventHandler(AddressOf Me.Page_Load)
End Sub
Private Sub IPS_pay(ByVal userinfo As String(), ByVal orderinfo As String(), ByVal payinfo As String(), ByVal orderid As String)
Dim text1 As String = DateTime.Now.ToString("yyyyMMdd")
Dim text2 As String = payinfo(2)
Dim text3 As String = Double.Parse(orderinfo(3)).ToString("f2")
Dim text4 As String = Me.thekey
Dim text5 As String = (text2 & orderid.Substring((orderid.Length - 6), 6))
Dim text6 As String = String.Concat(New String() { text5, text3, text1, "RMB", text4 })
Dim text7 As String = FormsAuthentication.HashPasswordForStoringInConfigFile(text6, "md5").ToLower
Dim text8 As String = ("http://" & MyBase.Request.ServerVariables.Item("SERVER_NAME") & MyBase.Request.ServerVariables.Item("URL").Replace("paysend.aspx", "payreturn.aspx"))
Dim text9 As String = ("<form method='post' action='" & payinfo(3) & "' name='post'>")
text9 = (text9 & "<input type='hidden' id=Mer_code name=Mer_code value=" & text2 & ">")
text9 = (text9 & "<input type='hidden' id=Billno name=Billno value='" & text5 & "'>")
text9 = (text9 & "<input type='hidden' id=Amount name=Amount value='" & text3 & "'>")
text9 = (text9 & "<input type='hidden' id=Date name=Date value='" & text1 & "'>")
text9 = (text9 & "<input type='hidden' id=Currency_Type name=Currency_Type value='RMB'>")
text9 = (text9 & "<input type='hidden' id=Gateway_Type name=Gateway_Type value='01'>")
text9 = (text9 & "<input type='hidden' id=Merchanturl name=Merchanturl value='" & text8 & "'>")
text9 = (text9 & "<input type='hidden' id=OrderEncodeType name=OrderEncodeType value='2'>")
text9 = (text9 & "<input type='hidden' id=SignMD5 name=SignMD5 value='" & text7 & "'>")
text9 = (text9 & "<input type='hidden' id=RetEncodeType name=RetEncodeType value='12'>")
text9 = (text9 & "<input type='hidden' id=Attach name=Attach value='IPS'>")
text9 = (text9 & "<input TYPE='submit' VALUE='" & ChrW(28857) & ChrW(20987) & ChrW(36827) & ChrW(20837) & "IPS" & ChrW(29615) & ChrW(36805) & ChrW(22312) & ChrW(32447) & ChrW(25903) & ChrW(20184) & ChrW(24179) & ChrW(21488) & "' name=v_action>")
text9 = (text9 & "</form>")
HttpContext.Current.Response.ContentEncoding = Encoding.GetEncoding("gb2312")
Me.gotopay.Text = text9
End Sub
Private Function MD51(ByVal _source As String) As String
Dim provider1 As New MD5CryptoServiceProvider
Return BitConverter.ToString(provider1.ComputeHash(Encoding.Default.GetBytes(_source))).Replace("-", "").ToLower
End Function
Protected Overrides Sub OnInit(ByVal e As EventArgs)
Me.InitializeComponent
MyBase.OnInit(e)
End Sub
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If ((((MyBase.Session.Item("userid") Is Nothing) OrElse (MyBase.Session.Item("id") Is Nothing)) OrElse ((Not MyBase.Session.Item("isok").ToString Is "ok") OrElse (MyBase.Request.QueryString.Item("orderid") Is Nothing))) OrElse Not hishopcheck.hishopcheck_isnum(MyBase.Request.QueryString.Item("orderid"))) Then
MyBase.Response.Redirect("~/loggin.aspx")
Else
Dim text1 As String = MyBase.Request.QueryString.Item("orderid")
Dim hishopcheck1 As New hishopcheck
Try
If Not hishopcheck1.hishoppass_verifyOrder(text1) Then
MyBase.Response.Write(hishopcheck.hishop_JS_ISok_Close(ChrW(24744) & ChrW(30340) & ChrW(35746) & ChrW(21333) & ChrW(23433) & ChrW(20840) & ChrW(26657) & ChrW(39564) & ChrW(22833) & ChrW(36133) & "!" & ChrW(26080) & ChrW(27861) & ChrW(36827) & ChrW(34892) & ChrW(19979) & ChrW(19968) & ChrW(27493) & "," & ChrW(35831) & ChrW(19982) & ChrW(31649) & ChrW(29702) & ChrW(21592) & ChrW(32852) & ChrW(31995) & "."))
MyBase.Response.End
End If
Catch obj2 As Object
MyBase.Response.Write(hishopcheck.hishop_JS_ISok_Close(ChrW(24744) & ChrW(30340) & ChrW(35746) & ChrW(21333) & ChrW(23433) & ChrW(20840) & ChrW(26657) & ChrW(39564) & ChrW(22833) & ChrW(36133) & ChrW(25110) & ChrW(20986) & ChrW(29616) & ChrW(24322) & ChrW(24120) & "!" & ChrW(26080) & ChrW(27861) & ChrW(36827) & ChrW(34892) & ChrW(19979) & ChrW(19968) & ChrW(27493) & "," & ChrW(35831) & ChrW(19982) & ChrW(31649) & ChrW(29702) & ChrW(21592) & ChrW(32852) & ChrW(31995) & "."))
MyBase.Response.End
End Try
Me.systemurl = ("http://" & MyBase.Request.ServerVariables.Item("SERVER_NAME") & MyBase.Request.ServerVariables.Item("URL"))
Me.myshop = New shopfanction
Dim textArray1 As String() = Me.myshop.fantionGetvalues(("select name,guojia,shengfen,diqu,dizhi,youbian,tel,mail,id from hishop_user where userid='" & MyBase.Session.Item("userid").ToString & "'"), 9)
Dim textArray2 As String() = Me.myshop.fantionGetvalues(("select userid,goodscountmoney,delivergoodsmoney,countmoney,datetime,paymentarea,paymentmode,delivergoods,consignee,thetext,state,fukuan,cultureid,culturecountmoney from hishop_order where id=" & MyBase.Request.QueryString.Item("orderid")), 14)
Dim textArray3 As String() = Me.myshop.fantionGetvalues(("select type,name,dizhi,gatewayuri,card,cardname,returnuri,payee,youbian,images,text,cardtype from hishop_paymentmode where id=" & textArray2(6)), 12)
Me.applicationid = ("pay_" & textArray2(6))
Select Case textArray3(0)
Case "5"
Me.advancepay(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "6"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
End If
Me.thekey = CStr(MyBase.Application.Item(Me.applicationid))
Me.pay_ipay_V301(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "7"
Me.pay_1stpay(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "10"
Me.pay_8848(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "11"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
End If
Me.thekey = CStr(MyBase.Application.Item(Me.applicationid))
Me.pay_chinaebank(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "12"
Me.pay_oips(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "13"
Me.pay_westpay(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "14"
Me.pay_paypalcn(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "15"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
End If
Me.thekey = CStr(MyBase.Application.Item(Me.applicationid))
Me.pay_payex(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "16"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
End If
Me.thekey = CStr(MyBase.Application.Item(Me.applicationid))
Me.cncard(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "17"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
End If
Me.thekey = CStr(MyBase.Application.Item(Me.applicationid))
Me.pay_allbuy(textArray1, textArray2, textArray3, MyBase.Request.QueryString.Item("orderid"))
Exit
Case "18"
If (MyBase.Application.Item(Me.applicationid) Is Nothing) Then
hishopcheck1.hishop_conver_oldpay2new
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -