Imports SysDataNet.Store Imports System.Data.SqlClient Public Class PaymentPageIPN Inherits System.Web.UI.Page Protected LangID As Integer = 0 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim LogDB As StoreDB = New StoreDB Dim PortalId As Integer = 0 Try '-------------------------------------------------------------------- ' Get the parameters from query string from Gateway Payment - Begin '-------------------------------------------------------------------- Dim strTxID As String = "" 'TransactionID Dim strCartID As String = "" 'CartID previously sent '-------------------------------------------------------------------- ' Get the parameters from query string from Gateway Payment - End '------------------------------------------------------------------- '---------------------------------------- ' Get the PortalID from CartID - Begin '---------------------------------------- Dim drUploadDirectory As SqlDataReader = LogDB.GetPortalIDUploadDirectory(strCartID, 0) While drUploadDirectory.Read PortalId = drUploadDirectory("PortalID") LangID = drUploadDirectory("LangID") End While drUploadDirectory.Close() '---------------------------------------- ' Get the PortalID from CartID - End '---------------------------------------- '---------------------------------------------------- ' If Response is VALID create the order - Begin '---------------------------------------------------- Dim CustRef As String = "Custom Payment Module" 'Reference must be: Custom Payment Module Dim ordersDatabase As StoreDB = New StoreDB 'Order Reference Dim RefOrder As String = "" Dim orderId As Integer = ordersDatabase.PlaceOrder(strTxID, 0, strCartID, CustRef, LangID, RefOrder, 0) '---------------------------------------------------- ' If Response is VALID create the order - End '---------------------------------------------------- 'Log the Error Catch er As Exception LogDB.AddLog(PortalId, "Custom Payment Module", er.Message, 0) End Try End Sub End Class