<% Option Explicit '********** code samples - remote_recurring_capture.txt - classic ASP '********** rev. 1.0 - remote "capture" of recurring payments '********** Date: 20-12-2006 ********************** '********** DanDomain A/S - Dennis Mathiesen - support@dandomain.dk dim XMLHTTPobj,PageUrl,Username,Password,Action,Destination,DestinationID,RecurringAmount '********** setup variables for later use - Replace varibles to fit your account info Username = "1234567" 'Change this to your merchant number from PBS Password = "1234567" ' Change this to your own password Action = "RecurringCapture" 'Can be "RecurringCapture" Destination = "RecurringCustNumber" ' Can only be Customernumber DestinationID = "100" ' The id of you Customernumber you wish to process RecurringAmount = "1,00" ' this can be left out if needed '********** Do not change anything below this line! unless you are familiar with programming PageUrl = "https://pay.dandomain.dk/PayApi.asp?username=" & Username & "&password=" & Password & "&" & Action & "=1&" & Destination &"="& DestinationID & "&RecurringAmount=" & RecurringAmount '********** 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 %>