Imports SysDataNet.Store Imports System.Data.SqlClient Public Class SentOrderPage Inherits System.Web.UI.Page Protected PortalID As Integer = 0 Protected tmpType As Integer = 0 Protected OrderID As Integer = 0 Protected dt1 As String Protected dt2 As String Protected TabIDOrig As Integer = 0 Protected langID As Integer = 0 Protected CurrPage As Integer = 1 Protected Type As Integer = 1 Protected strURLHome As String = "" Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try '----------------------------- 'Get the Parameters - BEGIN '----------------------------- 'Get the OrderID to edit If Not (Request.Params("OrderID") Is Nothing) Then OrderID = Request.Params("OrderID") End If 'Get the Type such as Send Order, Refund, Cancel If Not (Request.Params("tmpType") Is Nothing) Then tmpType = Request.Params("tmpType") End If If Not (Request.Params("langId") Is Nothing) Then langID = CInt(Request.Params("langId")) End If If Not (Request.Params("dt1") Is Nothing) Then dt1 = Request.Params("dt1") End If If Not (Request.Params("dt2") Is Nothing) Then dt2 = Request.Params("dt2") End If If Not (Request.Params("TabIDOrig") Is Nothing) Then TabIDOrig = Request.Params("TabIDOrig") End If If Not (Request.Params("CurrPage") Is Nothing) Then CurrPage = Request.Params("CurrPage") End If If Not (Request.Params("Type") Is Nothing) Then Type = Request.Params("Type") End If '----------------------------- 'Get the Parameters - END '----------------------------- '---------------------------------------------------------------- ' Get the TransactionID to send to the Gateway Payment - BEGIN '---------------------------------------------------------------- Dim SetDate As StoreDB = New StoreDB Dim strTXID As String = "" Dim drTypeTransaction As SqlDataReader = SetDate.GetTypeTransaction(OrderID, 0) While drTypeTransaction.Read() strTXID = drTypeTransaction("TX_ID") PortalID = drTypeTransaction("PortalID") End While drTypeTransaction.Close() '---------------------------------------------------------------- ' Get the TransactionID to send to the Gateway Payment - END '---------------------------------------------------------------- ' Get the URL Home strURLHome = SetDate.GetSettingString(PortalID, "url_home", 0) Dim strLogin As String = "" Dim strPassword As String = "" '------------------------------------------------------ ' if it is APPROVED, sent the order BEGIN '------------------------------------------------------ SetDate.SetSentDate(OrderID, tmpType, 0) 'Return to the Order Management Page Response.Redirect(strURLHome & "/Default.aspx?TabID=" & TabIDOrig & "&CurrPage=" & CurrPage & "&Type=" & Type & "&dt1=" & dt1 & "&dt2=" & dt2 & "&langID=" & langID) '------------------------------------------------------ ' if it is APPROVED, sent the order END '------------------------------------------------------ '-------------------------------------------------------------------- 'Log the error, to be seen in the Payment Log SDN Store Admin menu '-------------------------------------------------------------------- Catch er As Exception Dim LogDB As StoreDB = New StoreDB LogDB.AddLog(PortalID, "Custom Payment Module", er.Message, 0) End Try End Sub End Class