Permalink
Browse files

.

  • Loading branch information...
1 parent e901f79 commit 3463fad208d631f20de82db0ee015e3187730609 attdevsupport committed Jul 27, 2012
@@ -0,0 +1,3 @@
+79e89e06-6e28-442f-a684-a2b5c55eb669
+SuccesfulRefund
+7017401752702162
@@ -1,3 +1,10 @@
+<%
+//Licensed by AT&T under 'Software Development Kit Tools Agreement.' 2012
+//TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
+//Copyright 2012 AT&T Intellectual Property. All rights reserved. http://developer.att.com
+//For more information contact developer.support@att.com
+%>
+
<%@ page contentType="application/json" language="java" %><%@ page import="java.io.*" %><%@ page import="java.util.Arrays" %><%@ page import="java.util.Collections" %><%@ page import="java.util.Comparator" %><%@ include file="config.jsp" %><%
String notificationId = "";
@@ -16,22 +23,21 @@ Collections.reverse(Arrays.asList(files));
if(directory.listFiles().length>0) {
-//if(total> 0) {
int i = 0;
for(File notificationFile : files){
String notificationFileName = notificationFile.getName();
RandomAccessFile inFile1 = new RandomAccessFile(application.getRealPath("Notifications/" + notificationFileName),"r");
notificationId = (inFile1.readLine()).trim();
inFile1.close();
- if((i==directory.listFiles().length-1)) { // || (i==9)
+ if((i==directory.listFiles().length-1)) {
%>{"path":"Notifications/<%=notificationFileName%>","notificationId":"<%=notificationId%>"}]}<%
} else {
%>{"path":"Notifications/<%=notificationFileName%>","notificationId":"<%=notificationId%>"},<%
}
i += 1;
- // if(i==9 )
- // break;
+ if(i==9 )
+ break;
}
}
-%>
+%>
@@ -1,3 +1,10 @@
+<%
+//Licensed by AT&T under 'Software Development Kit Tools Agreement.' 2012
+//TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
+//Copyright 2012 AT&T Intellectual Property. All rights reserved. http://developer.att.com
+//For more information contact developer.support@att.com
+%>
+
<%@ page contentType="application/json" language="java" %><%@ page import="java.io.*" %><%@ page import="java.util.Arrays" %><%@ page import="java.util.Collections" %><%@ page import="java.util.Comparator" %><%@ include file="config.jsp" %><%
String transactionId = "";
String merchantTransactionId = "";
@@ -49,10 +56,10 @@ if(directory.listFiles().length>0) {
%>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>"},<%
}
i += 1;
- if(i==5)
+ if(i==9)
break;
}
} else {
%>]}<%
}
-%>
+%>
@@ -15,38 +15,37 @@
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>
<%@ page import="org.apache.commons.codec.binary.Base64" %>
-<%
+<%@ page import="java.util.regex.*"%>
-LinkedHashMap<String, String> paramLinkedMap = new LinkedHashMap<String, String>();
+<%LinkedHashMap<String, String> paramLinkedMap = new LinkedHashMap<String, String>();
try{
-String data=null;
+ String data=null;
-InputStream is = request.getInputStream();
-ByteArrayOutputStream baos = new ByteArrayOutputStream();
-byte buf[] = new byte[1024];
-int letti;
+ InputStream is = request.getInputStream();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
-while ((letti = is.read(buf)) > 0)
-baos.write(buf, 0, letti);
+ byte buf[] = new byte[1024];
+ int letti;
-data = new String(baos.toByteArray());
-String notificationId = data.split("<hub:notificationId>")[1].split("</hub:notificationId>")[0].substring(2);
+ while ((letti = is.read(buf)) > 0)
+ {
+ baos.write(buf, 0, letti);
+ }
+ data = new String(baos.toByteArray());
+ String getSplit =data.split("<hub:notificationId>")[1];
+ String notificationId = getSplit.substring(0,36);
-System.out.print("the data is : " + data);
-//String print = data;
+ int random = (int)(Math.random()*10000000);
+ PrintWriter outWrite = new PrintWriter(new BufferedWriter(new FileWriter(application.getRealPath("/Notifications/" + random + ".txt"))), false);
+ String toSave = notificationId;
+ outWrite.write(toSave);
-int random = (int)(Math.random()*10000000);
-
-PrintWriter outWrite = new PrintWriter(new BufferedWriter(new FileWriter(application.getRealPath("/Notifications/" + random + ".txt"))), false);
-String toSave = notificationId;
-outWrite.write(toSave);
-
-outWrite.close();
+ outWrite.close();
}catch(Exception e){
}
-%>
+%>
@@ -166,7 +166,7 @@ Feature 1: Sign Payload</h2>
<div id="footer">
- <div style="float: right; width: 20%; font-size: 9px; text-align: right">Powered by AT&amp;T Virtual Mobile</div>
+ <div style="float: right; width: 20%; font-size: 9px; text-align: right">Powered by AT&amp;T Cloud Architecture</div>
<p>&#169; 2012 AT&amp;T Intellectual Property. All rights reserved. <a href="http://developer.att.com/" target="_blank">http://developer.att.com</a>
<br>
The Application hosted on this site are working examples intended to be used for reference in creating products to consume AT&amp;T Services and not meant to be used as part of your product. The data in these pages is for test purposes only and intended only for use as a reference in how the services perform.
Oops, something went wrong.

0 comments on commit 3463fad

Please sign in to comment.