<%
'/
' THIS CODE WILL NOT WORK IF YOU DID NOT GRANT THE IUSR_MACHINENAME AND IWAM_MACHINENAME ACCOUNT ACCESS PERMISSION TO THE PAYPAL API SSL CERT, BECAUSE THOSE ARE THE ACCOUNTS THAT EXECUTE ASP3 CODE (NOT THE ASPNET ACCOUNT). WORKS LIKE A CHARM
' IF YOU READ THE DIRECTIONS GOOD LUCK
'/
username = "xxxx_api1.vtecom.com"
password = "yourpassword"
Dim objXMLDOC
Dim objXMLDOM
Dim objXSLDOM
Dim SoapStr
SoapStr = "<?xml version='1.0' encoding='UTF-8'?>"
SoapStr = SoapStr & "<SOAP-ENV:Envelope "
SoapStr = SoapStr & "xmlnssd='http://www.w3.org/1999/XMLSchema '"
SoapStr = SoapStr & "xmlnssi='http://www.w3.org/1999/XMLSchema-instance' "
SoapStr = SoapStr & "xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' "
SoapStr = SoapStr & "xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' "
SoapStr = SoapStr & "SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>"
SoapStr = SoapStr & "<SOAP-ENV:Header>"
SoapStr = SoapStr & "<RequesterCredentials "
SoapStr = SoapStr & "xmlns='urn:ebay:api:PayPalAPI' "
SoapStr = SoapStr & "SOAP-ENV:mustUnderstand='1'>"
SoapStr = SoapStr & "<Credentials xmlns='urn:ebay:apis:eBLBaseComponents'>"
SoapStr = SoapStr & "<Username>"&username &"</Username>"
SoapStr = SoapStr & "<Password>"&password &"</Password>"
SoapStr = SoapStr & "<Subject></Subject>"
SoapStr = SoapStr & "</Credentials>"
SoapStr = SoapStr & "</RequesterCredentials>"
SoapStr = SoapStr & "</SOAP-ENV:Header>"
SoapStr = SoapStr & "<SOAP-ENV:Body>"
' Actions Below Here
SoapStr = SoapStr & "<DoDirectPaymentReq xmlns='urn:ebay:api:PayPalAPI'>"
SoapStr = SoapStr & "<DoDirectPaymentRequest xsi:type='nsoDirectPaymentRequestType'>"
SoapStr = SoapStr & "<Version xmlns='urn:ebay:apis:eBLBaseComponents' xsi:type='xsd:string'>1.0</Version>"
SoapStr = SoapStr & "<DoDirectPaymentRequestDetails xmlns='urn:ebay:apis:eBLBaseComponents'>"
SoapStr = SoapStr & "<PaymentAction>Sale</PaymentAction>"
SoapStr = SoapStr & "<PaymentDetails>"
SoapStr = SoapStr & "<OrderTotal currencyID='USD'>60</OrderTotal>"
SoapStr = SoapStr & "</PaymentDetails>"
SoapStr = SoapStr & "<CreditCard>"
SoapStr = SoapStr & "<CreditCardType>Visa</CreditCardType>"
SoapStr = SoapStr & "<CreditCardNumber>4250614840518960</CreditCardNumber>"
SoapStr = SoapStr & "<ExpMonth>05</ExpMonth>"
SoapStr = SoapStr & "<ExpYear>2008</ExpYear>"
SoapStr = SoapStr & "<CardOwner>"
SoapStr = SoapStr & "<PayerName>"
SoapStr = SoapStr & "<FirstName>Joe</FirstName>"
SoapStr = SoapStr & "<LastName>Smith</LastName>"
SoapStr = SoapStr & "</PayerName>"
SoapStr = SoapStr & "<Address>"
SoapStr = SoapStr & "<Street1>
SoapStr = SoapStr & "<CityName>San Jose</CityName>"
SoapStr = SoapStr & "<StateOrProvince>CA</StateOrProvince>"
SoapStr = SoapStr & "<Country>US</Country>"
SoapStr = SoapStr & "<PostalCode>95131</PostalCode>"
SoapStr = SoapStr & "</Address>"
SoapStr = SoapStr & "</CardOwner>"
SoapStr = SoapStr & "</CreditCard>"
SoapStr = SoapStr & "<IPAddress>123.123.123.123</IPAddress>"
SoapStr = SoapStr & "</DoDirectPaymentRequestDetails>"
SoapStr = SoapStr & "</DoDirectPaymentRequest>"
SoapStr = SoapStr & "</DoDirectPaymentReq>"
SoapStr = SoapStr & "</SOAP-ENV:Body>"
SoapStr = SoapStr & "</SOAP-ENV:Envelope>"
Set objXMLDOC = Server.CreateObject("Msxml2.ServerXMLHTTP")
Set objXMLDOM = Server.CreateObject("Msxml2.DomDocument")
objXMLDOC.setOption 3, "LOCAL_MACHINE/MY/" &username
objXMLDOC.SetOption 2, 13056
objXMLDOC.setTimeouts 10 * 100, 10 * 100, 10 * 100, 10 * 100
objXMLDOC.open "POST", "https://api.paypal.com/2.0/", False
objXMLDOC.setRequestHeader "Content-Type", "text/xml"
objXMLDOC.send (SoapStr)
objXMLDOM.async=false
objXMLDOM.loadXML objXMLDOC.responseText
Response.Write objXMLDOC.responseText
Set objXMLDOC = Nothing
Set objXMLDOM = Nothing
1 Main St </Street1>"