<%@ Page SmartNavigation="false" Language="vb" AutoEventWireup="false" ValidateRequest="false" %> PayU Ödeme Sayfası <% 'If Not Me.FindControl("head1") Is Nothing Then ' Dim head As Control = Me.FindControl("head1") ' Dim l As New Literal ' l.Text = "" ' head.Controls.Add(l) 'End If Dim tmpOrder As TempOrder = Session("TempOrder") Dim b_FName, b_LName, b_Phone, b_Country, b_District, b_City As String Dim b_FAddress As String = turkce(tmpOrder.BillingInfo.Address) Dim s_Faddress As String = turkce(tmpOrder.ShippingInfo.Address) Dim mail As String = turkce(tmpOrder.ShippingInfo.Mail) b_Country = "TR" If mail = "" Then mail = "-" End If If tmpOrder.BillingInfo.CompanyName <> "" Then If tmpOrder.BillingInfo.CompanyName.Contains(" ") Then b_FName = turkce(tmpOrder.BillingInfo.CompanyName.Split(" ")(0)) b_LName = turkce(tmpOrder.BillingInfo.CompanyName.Split(" ")(1)) Else b_FName = turkce(tmpOrder.BillingInfo.CompanyName) b_LName = turkce(tmpOrder.BillingInfo.CompanyName) End If b_Phone = tmpOrder.BillingInfo.PhoneNo b_District = turkce(tmpOrder.BillingInfo.DistrictName) b_City = turkce(tmpOrder.BillingInfo.CityName) Else If tmpOrder.ShippingInfo.RecipientName.Contains(" ") Then b_FName = turkce(tmpOrder.ShippingInfo.RecipientName.Split(" ")(0)) b_LName = turkce(tmpOrder.ShippingInfo.RecipientName.Split(" ")(1)) Else b_FName = turkce(tmpOrder.ShippingInfo.RecipientName) b_LName = turkce(tmpOrder.ShippingInfo.RecipientName) End If b_Phone = tmpOrder.ShippingInfo.PhoneNo b_District = turkce(tmpOrder.BillingInfo.DistrictName) b_City = turkce(tmpOrder.BillingInfo.CityName) End If Dim clientId As String = ConfigurationManager.AppSettings("PayUCode") Dim oid As String = GetRandomOrderCode() Dim odate As String = Date.Now.ToString("yyyy-MM-dd HH:mm:ss") Dim currency As String = "TRY" Dim amount As String = Format(Session("amount"), "0.00").Replace(",", ".") 'Dim amount As String = Format(tmpOrder.Pricess.KargoDahilPayUToplam, "0.00").Replace(",", ".") Dim okUrl As String = BaseUrl & "/store/orderstep3d.aspx?oid=" & oid 'ssl If ConfigurationManager.AppSettings("UseSsl") = "True" Then okUrl = BaseUrl.Replace("http://", "https://") & "/store/orderstep3d.aspx?oid=" & oid End If Dim storekey As String = ConfigurationManager.AppSettings("PayUSecret") Dim hashstr As New StringBuilder() 'vars = 'MERCHANT,ORDER_REF,ORDER_DATE,ORDER_PNAME[],ORDER_PCODE[],ORDER_PINFO[], 'ORDER_PRICE[],ORDER_QTY[],ORDER_VAT[],ORDER_SHIPPING,PRICES_CURRENCY, 'DISCOUNT,DESTINATION_CITY,DESTINATION_STATE,DESTINATION_COUNTRY,PAY_METHOD, 'ORDER_PRICE_TYPE[],INSTALLMENT_OPTIONS'; 'MERCHANT hashstr.Append(Encoding.Default.GetBytes(clientId).Length & clientId) 'ORDER_REF hashstr.Append(Encoding.Default.GetBytes(oid).Length & oid) 'ORDER_DATE hashstr.Append(Encoding.Default.GetBytes(odate).Length & odate) 'ORDER_PNAME hashstr.Append(Encoding.Default.GetBytes("Siparis Kodu : " & oid).Length & "Siparis Kodu : " & oid) 'ORDER_PCODE hashstr.Append(Encoding.Default.GetBytes(oid).Length & oid) 'ORDER_PINFO hashstr.Append(Encoding.Default.GetBytes("").Length & "") 'ORDER_PRICE hashstr.Append(Encoding.Default.GetBytes(amount).Length & amount) 'ORDER_QTY hashstr.Append(Encoding.Default.GetBytes("1").Length & "1") ' adet 'ORDER_VAT hashstr.Append(Encoding.Default.GetBytes("0").Length & "0") ' kdv 'ORDER_SHIPPING hashstr.Append(Encoding.Default.GetBytes("0").Length & "0") ' kargo 'PRICES_CURRENCY hashstr.Append(Encoding.Default.GetBytes(currency).Length & currency) 'DISCOUNT hashstr.Append(Encoding.Default.GetBytes("0").Length & "0") 'DESTINATION_CITY hashstr.Append(Encoding.Default.GetBytes("").Length & "") 'DESTINATION_STATE hashstr.Append(Encoding.Default.GetBytes("").Length & "") 'DESTINATION_COUNTRY hashstr.Append(Encoding.Default.GetBytes("").Length & "") 'PAY_METHOD hashstr.Append(Encoding.Default.GetBytes("CCVISAMC").Length & "CCVISAMC") 'ORDER_PRICE_TYPE hashstr.Append(Encoding.Default.GetBytes("GROSS").Length & "GROSS") 'INSTALLMENT_OPTIONS hashstr.Append(Encoding.Default.GetBytes("").Length & "") 'Hash Dim sb As New StringBuilder() Dim data As Byte() = Encoding.Default.GetBytes(hashstr.ToString) Dim secretkey As Byte() = Encoding.Default.GetBytes(storekey) Dim hmacMD5 As New System.Security.Cryptography.HMACMD5(secretkey) Dim macSender As Byte() = hmacMD5.ComputeHash(data) For i As Integer = 0 To macSender.Length - 1 sb.Append(macSender(i).ToString("x2")) Next hmacMD5.Clear() Dim hash As String = sb.ToString() Dim istest As String = "0" If ConfigurationManager.AppSettings("PayUIsTest") = "True" Then istest = "1" End If '/****************** GEREKLİ PARAMETRELER *********************/ %>
PayU Sistemine Bağlanıyor... Yükleniyor

Lütfen Bekleyiniz...
Kapat