|
|
|
|
Thank You For Your Payment
Your transaction has been completed
and a receipt for your purchase has been emailed to you.
You may log into your account at
www.paypal.com/uk
to view details of this transaction.
We look forward to being of service to you.
<%@LANGUAGE="VBScript"%>
<%
Dim authToken, txToken
Dim query
Dim objHttp
Dim sQuerystring
Dim sParts, iParts, aParts
Dim sResults, sKey, sValue
Dim i, result
Dim firstName, lastName, itemName, mcGross, mcCurrency
authToken = "Dc7P6f0ZadXW-U1X8oxf8_vUK09EHBMD7_53IiTT-CfTpfzkN0nipFKUPYy"
txToken = Request.Querystring("tx")
query = "cmd=_notify-synch&tx=" & txToken &
"&at=" & authToken
set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
' set objHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
objHttp.open "POST", "http://www.paypal.com/cgi-bin/webscr", false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send query
sQuerystring = objHttp.responseText
If Mid(sQuerystring,1,7) = "SUCCESS" Then
sQuerystring = Mid(sQuerystring,9)
sParts = Split(sQuerystring, vbLf)
iParts = UBound(sParts) - 1
ReDim sResults(iParts, 1)
For i = 0 To iParts
aParts = Split(sParts(i), "=")
sKey = aParts(0)
sValue = aParts(1)
sResults(i, 0) = sKey
sResults(i, 1) = sValue
Select Case sKey
Case "first_name"
firstName = sValue
Case "last_name"
lastName = sValue
Case "item_name"
itemName = sValue
Case "mc_gross"
mcGross = sValue
Case "mc_currency"
mcCurrency = sValue
End Select
Next
Response.Write("Your order has been received.")
Response.Write("Details ")
Response.Write("Name: " & firstName & " " & lastName & "")
Response.Write("Description: " & itemName & "")
Response.Write("Amount: " & mcCurrency & " " & mcGross & "")
Response.Write(" ")
Else
'log for manual investigation
Response.Write("ERROR")
End If
%>
|
|
|
|
|
|
| |