<% Option Explicit '********** code samples - classic ASP ************ '********** rev. 1.0 - remote renew / capture / decline regular transactions '********** Date: 05-12-2006 ********************** '********** DanDomain A/S - Dennis Mathiesen ********** dim XMLHTTPobj,PageUrl,MerchantNumber,Password,Action,Destination,DestinationID,ChangeAmount,Amount '********** setup variables for later use - Replace varibles to fit your account info MerchantNumber = "1231237" 'Change this to your merchant number from PBS Password = "1234567" ' Change this to your own password Action = "renew" 'Can be "renew" OR "capture" OR "decline" Destination = "OrderID" 'Can be "orderid" OR "transid" - depends on what you prefer DestinationID = "1020" ' The id of you transaction or OrderID you wish to process ChangeAmount = "0" ' Normally this i set to "0" OR "1". "1" to change the original amount Amount = "1,00" ' If ChangeAmount variable is set to "1" then you can lower the original amount '********** Do not change anything below this line! unless you are familiar with programming PageUrl = "https://pay.dandomain.dk/PayApi.asp?username=" & merchantnumber & "&password=" & Password & "&" & Action & "=1&" & Destination &"="& DestinationID if ChangeAmount <> "0" then PageUrl = PageUrl & "&ChangeAmount=" & ChangeAmount & "&Amount=" & Amount End If '********** Uncheck below to see how the url looks like ' Response.Write pageurl '********** Create the xml http object, version and protocol - check xml version on your webserver before using set XMLHTTPobj = server.CreateObject("Msxml2.ServerXMLHTTP.4.0") '********** Open the xml http object ************** XMLHTTPobj.open "GET", PageUrl,false '********** Execute ******************************* '********** Execution can be looped if needed and you have more than one transaction to process XMLHTTPobj.send '********** print the response you get from the server Response.Write XMLHTTPobj.responseText '********** close object for later use ************ set XMLHTTPobj = nothing %>