Permalink
Browse files

Updating with latest code for sms and payment.

  • Loading branch information...
1 parent 5dc2dd5 commit ebb5e96c2e6e60d620909a7db1b8635a61d429a3 attdevsupport committed Jul 30, 2012
@@ -5,7 +5,11 @@
//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" %><%
+<%@ 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 = "";
@@ -27,7 +31,12 @@ if(directory.listFiles().length>0) {
for(File notificationFile : files){
String notificationFileName = notificationFile.getName();
RandomAccessFile inFile1 = new RandomAccessFile(application.getRealPath("Notifications/" + notificationFileName),"r");
- notificationId = (inFile1.readLine()).trim();
+ if (i > 9)
+ {
+ File f = new File(application.getRealPath("Notifications/" + notificationFileName));
+ f.delete();
+ }
+ notificationId = (inFile1.readLine()).trim();
inFile1.close();
if((i==directory.listFiles().length-1)) {
@@ -36,8 +45,6 @@ if(directory.listFiles().length>0) {
%>{"path":"Notifications/<%=notificationFileName%>","notificationId":"<%=notificationId%>"},<%
}
i += 1;
- if(i==9 )
- break;
}
}
%>
@@ -5,11 +5,16 @@
//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" %><%
+<%@ 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 = "";
String transactionAuthCode = "";
String consumerId = "";
+String MerchantSubscriptionIdList = "";
File directory = new File(application.getRealPath("/transactionData/"));
File[] files = directory.listFiles();
@@ -33,6 +38,7 @@ if(directory.listFiles().length>0) {
merchantTransactionId = inFile1.readLine();
transactionAuthCode = inFile1.readLine();
consumerId = inFile1.readLine();
+ MerchantSubscriptionIdList = inFile1.readLine();
if(transactionId==null || transactionId.equalsIgnoreCase("null"))
transactionId = "";
if(transactionId.indexOf(194)!=-1)
@@ -49,14 +55,20 @@ if(directory.listFiles().length>0) {
consumerId = "";
if(consumerId.indexOf(194)!=-1)
consumerId = consumerId.substring(0, consumerId.length()-2);
+
+ if(MerchantSubscriptionIdList==null || MerchantSubscriptionIdList.equalsIgnoreCase("null"))
+ MerchantSubscriptionIdList = "";
+ if(MerchantSubscriptionIdList.indexOf(194)!=-1)
+ MerchantSubscriptionIdList = MerchantSubscriptionIdList.substring(0, MerchantSubscriptionIdList.length()-2);
+
inFile1.close();
- if((i==directory.listFiles().length-1) || (i==4)) {
- %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>"}]}<%
+ if((i==directory.listFiles().length-1) || (i==5)) {
+ %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>","MerchantSubscriptionIdList":"<%=MerchantSubscriptionIdList%>"}]}<%
} else {
- %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>"},<%
+ %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>","MerchantSubscriptionIdList":"<%=MerchantSubscriptionIdList%>"},<%
}
i += 1;
- if(i==9)
+ if(i==6)
break;
}
} else {
@@ -5,7 +5,11 @@
//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" %><%
+<%@ 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 = "";
@@ -27,7 +31,12 @@ if(directory.listFiles().length>0) {
for(File notificationFile : files){
String notificationFileName = notificationFile.getName();
RandomAccessFile inFile1 = new RandomAccessFile(application.getRealPath("Notifications/" + notificationFileName),"r");
- notificationId = (inFile1.readLine()).trim();
+ if (i > 9)
+ {
+ File f = new File(application.getRealPath("Notifications/" + notificationFileName));
+ f.delete();
+ }
+ notificationId = (inFile1.readLine()).trim();
inFile1.close();
if((i==directory.listFiles().length-1)) {
@@ -36,8 +45,6 @@ if(directory.listFiles().length>0) {
%>{"path":"Notifications/<%=notificationFileName%>","notificationId":"<%=notificationId%>"},<%
}
i += 1;
- if(i==9 )
- break;
}
}
-%>
+%>
@@ -5,11 +5,16 @@
//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" %><%
+<%@ 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 = "";
String transactionAuthCode = "";
String consumerId = "";
+String MerchantSubscriptionIdList = "";
File directory = new File(application.getRealPath("/transactionData/"));
File[] files = directory.listFiles();
@@ -33,6 +38,7 @@ if(directory.listFiles().length>0) {
merchantTransactionId = inFile1.readLine();
transactionAuthCode = inFile1.readLine();
consumerId = inFile1.readLine();
+ MerchantSubscriptionIdList = inFile1.readLine();
if(transactionId==null || transactionId.equalsIgnoreCase("null"))
transactionId = "";
if(transactionId.indexOf(194)!=-1)
@@ -49,14 +55,20 @@ if(directory.listFiles().length>0) {
consumerId = "";
if(consumerId.indexOf(194)!=-1)
consumerId = consumerId.substring(0, consumerId.length()-2);
+
+ if(MerchantSubscriptionIdList==null || MerchantSubscriptionIdList.equalsIgnoreCase("null"))
+ MerchantSubscriptionIdList = "";
+ if(MerchantSubscriptionIdList.indexOf(194)!=-1)
+ MerchantSubscriptionIdList = MerchantSubscriptionIdList.substring(0, MerchantSubscriptionIdList.length()-2);
+
inFile1.close();
- if((i==directory.listFiles().length-1) || (i==4)) {
- %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>"}]}<%
+ if((i==directory.listFiles().length-1) || (i==5)) {
+ %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>","MerchantSubscriptionIdList":"<%=MerchantSubscriptionIdList%>"}]}<%
} else {
- %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>"},<%
+ %>{"transactionId":"<%=transactionId%>","merchantTransactionId":"<%=merchantTransactionId%>","transactionAuthCode":"<%=transactionAuthCode%>","consumerId":"<%=consumerId%>","MerchantSubscriptionIdList":"<%=MerchantSubscriptionIdList%>"},<%
}
i += 1;
- if(i==5)
+ if(i==6)
break;
}
} else {
Oops, something went wrong.

0 comments on commit ebb5e96

Please sign in to comment.