%@ page import="java.util.*" %> <%@ page import="java.net.*" %> <%@ page import="java.io.*" %> <% // read post from PayPal system and add 'cmd' Enumeration en = request.getParameterNames(); String str = "cmd=_notify-validate"; while(en.hasMoreElements()){ String paramName = (String)en.nextElement(); String paramValue = request.getParameter(paramName); str = str + "&" + paramName + "=" + URLEncoder.encode(paramValue); } // 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("http://www.paypal.com/cgi-bin/webscr"); URLConnection uc = u.openConnection(); uc.setDoOutput(true); uc.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); PrintWriter pw = new PrintWriter(uc.getOutputStream()); pw.println(str); pw.close(); BufferedReader in = new BufferedReader( new InputStreamReader(uc.getInputStream())); String res = in.readLine(); in.close(); // assign posted variables to local variables String itemName = request.getParameter("item_name"); String itemNumber = request.getParameter("item_number"); String paymentStatus = request.getParameter("payment_status"); String paymentAmount = request.getParameter("mc_gross"); String paymentCurrency = request.getParameter("mc_currency"); String txnId = request.getParameter("txn_id"); String receiverEmail = request.getParameter("receiver_email"); String payerEmail = request.getParameter("payer_email"); check notification validation if(res.equals("VERIFIED")) { // check that paymentStatus=Completed // check that txnId has not been previously processed // check that receiverEmail is your Primary PayPal email // check that paymentAmount/paymentCurrency are correct // process payment } else if(res.equals("INVALID")) { // log for investigation } else { // error } %>
|
|
Welcome to "GUNdepot Customs" formerly known as "T & A Gun Refinishing" Our MissionOur mission at GUNdepot Customs is to provide the same high quality of workmanship that T & A Gun Refinishing has done for 39 years also bring to you are customers high quality custom gun smiting, gun refinishing, and custom built firearms to your likings with the same reasonable turnaround time of around 7-10 days. Company ProfileT & A Gun refinishing now known as "GUNdepot Customs" has been established in 1968. When GUNdepot Customs (T & A Gun Refinishing) started in in 1968 was dedicated to refinishing blue only. Throughout the years other finishes such as Nickel, Hard Chrome, Decretive Chrome, Parkerizing, Cerakote, and Gold were added as well as Gunsmithing. Now with over 30 Years of experience GUNdepot Customs also provides custom work which has lead us to specialize in International Defensive Pistol Association (IDPA), United States Practical Shooting Assoc. (USPSA), International Practical Shooting Confederation (IPSC), and Law Enforcement Tactical Weapons. GUNdepot Customs prides itself in being the only gun shop in the nation where one can buy, refinish, customize, and accessorize one's firearm in one location with quality of work that its customers have come to expect. Contact Information
Number of hits since 4-21-2007 |
Send mail to redbrickfarms@highstream.net with questions or comments about this web site. |