Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<%
String s = URLEncoder.encode("USER=dal_127735536_biz_api1.live.at&PWD=RUPEX922NWC9V8M&SIGNATURE=An5ns1Kso7MWUdWErQKJJJ4qi4-A88lFFVjpgaT5asRyxXaPL9EfIZ&[email protected]&METHOD=SetExpressCheckout&RETURNURL=https://www.mey.com&CANCELURL=https://www.mey.com", "UTF-8");
URL url = new URL("https://api-3t.sandbox.paypal.com/nvp");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(s);
writer.flush();
StringBuffer answer = new StringBuffer();
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
answer.append(line);
}
writer.close();
reader.close();
//Output the response
System.out.println("antwort "+answer.toString());
%>
HttpClient client = new HttpClient();
String url = "https://api-3t.sandbox.paypal.com/nvp";
String key5 = URLEncoder.encode("METHOD","UTF-8");
String value5 = URLEncoder.encode("SetExpressCheckout","UTF-8");
String key6 = URLEncoder.encode("RETURNURL","UTF-8");
String value6 = URLEncoder.encode("https://www.mey.com","UTF-8");
String key7 = URLEncoder.encode("CANCELURL","UTF-8");
String value7 = URLEncoder.encode("https://www.mey.com","UTF-8");
String allParams = "?"+key+"=dan_127739536_biz_api1.live.at&"+key2+"=RUPEX922NCQ9V8M&"+key3+"=An5ns1Kso7WUdW4ErQKJJJ4qi4-A88lF0VjpgaT5asRyxXaPL9EfIZ&VERSION=53.0&AMT=2.0&"+key5+"="+value5+"&"+key6+"="+value6+"&"+key7+"="+value7;
out.println(url+allParams);
GetMethod fileGet = new GetMethod(url+allParams);
try{
client.executeMethod(fileGet);
if (fileGet.getStatusCode() == HttpStatus.SC_OK) {
String response2 = fileGet.getResponseBodyAsString();
out.println("Response = " + response2);
}
else{
out.println(fileGet.getStatusCode());
out.println("ne");
}
}
catch(Exception e){System.out.println(e);}