Subversion Repositories SmartDukaan

Rev

Rev 712 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 712 Rev 719
Line 173... Line 173...
173
		
173
		
174
		try {
174
		try {
175
			if(pipe.performPaymentInitialization() != e24PaymentPipe.SUCCESS) 
175
			if(pipe.performPaymentInitialization() != e24PaymentPipe.SUCCESS) 
176
				{
176
				{
177
					System.out.println("Error sending Payment Initialization Request: ");
177
					System.out.println("Error sending Payment Initialization Request: ");
178
					response.sendRedirect(response.encodeRedirectURL( errorURL + "?ErrorText="+pipe.getErrorMsg()));
178
					response.sendRedirect(response.encodeRedirectURL( errorURL + "?ErrorText="+pipe.getErrorMsg()+"&paymentId="+paymentId));
179
					redirectURL = errorURL + "?ErrorText="+pipe.getErrorMsg();
179
					redirectURL = errorURL + "?ErrorText="+pipe.getErrorMsg();
180
					response.setHeader("Location", redirectURL);
180
					response.setHeader("Location", redirectURL);
181
					response.setStatus(HttpServletResponse.SC_TEMPORARY_REDIRECT);
181
					response.setStatus(HttpServletResponse.SC_FOUND);
182
				}
182
				}
183
			else
183
			else
184
				{
184
				{
185
					String PaymentID = pipe.getPaymentId();
185
					String PaymentID = pipe.getPaymentId();
186
					String payURL = pipe.getPaymentPage();
186
					String payURL = pipe.getPaymentPage();
187
					response.sendRedirect(response.encodeRedirectURL( payURL + "?PaymentID=" + PaymentID ));
-
 
188
					
-
 
189
					redirectURL = payURL + "?PaymentID=" + PaymentID;
187
					redirectURL = payURL + "?PaymentID=" + PaymentID;
-
 
188
					response.sendRedirect(response.encodeRedirectURL( redirectURL ));
-
 
189
					
190
					response.setHeader("Location", redirectURL);
190
					response.setHeader("Location", redirectURL);
191
					response.setStatus(HttpServletResponse.SC_TEMPORARY_REDIRECT);
191
					response.setStatus(HttpServletResponse.SC_FOUND);
192
				}
192
				}
193
			return "success";
193
			return "success";
194
		} catch (NotEnoughDataException e) {
194
		} catch (NotEnoughDataException e) {
195
			// TODO Auto-generated catch block
195
			// TODO Auto-generated catch block
196
			e.printStackTrace();
196
			e.printStackTrace();