I am building a verification page that will post back the IPN string from Paypal as one part of the validation process. I am writing my code in jscript which is embedded in an asp page. I am stumped on how the page automatically posts the IPN string back to Paypal. I found some code on the Paypal site that does just this but it appears it is written in Java, not Jscript and I don't know how to write anything equivalent. Can anyone help me?
Here is the portion of the code I am stumped on:
// post back to PayPal system to validate
// NOTE: change http: to https: in the following URL to verify using SSL (for increased security).
// using HTTPS requires either Java 1.4 or greater, or Java Secure Socket Extension (JSSE)
// and configured for older versions.
URL u = new URL("URLConnection uc = u.openConnection();
uc.setDoOutput(true);
uc.setRequestProperty("Content-Type","application/x-PrintWriter pw = new PrintWriter(uc.getOutputStream());
pw.println(str);
pw.close();
Here is the portion of the code I am stumped on:
// post back to PayPal system to validate
// NOTE: change http: to https: in the following URL to verify using SSL (for increased security).
// using HTTPS requires either Java 1.4 or greater, or Java Secure Socket Extension (JSSE)
// and configured for older versions.
URL u = new URL("URLConnection uc = u.openConnection();
uc.setDoOutput(true);
uc.setRequestProperty("Content-Type","application/x-PrintWriter pw = new PrintWriter(uc.getOutputStream());
pw.println(str);
pw.close();