Subversion Repositories SmartDukaan

Rev

Rev 2263 | Rev 2334 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2263 Rev 2264
Line 40... Line 40...
40
	private static final String TXN_KEY = "TransactionID";
40
	private static final String TXN_KEY = "TransactionID";
41
	private static final String AUTH_TXN_ID = "AuthTxnId";
41
	private static final String AUTH_TXN_ID = "AuthTxnId";
42
	private static final String CAPTURE_TXN_ID = "CaptureTxnId";
42
	private static final String CAPTURE_TXN_ID = "CaptureTxnId";
43
	private static final String CAPTURE_TIME = "CaptureTime";
43
	private static final String CAPTURE_TIME = "CaptureTime";
44
	
44
	
45
	private static String processingUrl;
-
 
-
 
45
	
46
	private static String successUrl;
46
	private static String successUrl;
47
	private static String errorUrl;
47
	private static String errorUrl;
48
	
48
	
49
	/**
49
	/**
50
	 * The secret key used to decode RC4 encoded data.
50
	 * The secret key used to decode RC4 encoded data.
Line 54... Line 54...
54
	private String redirectUrl;
54
	private String redirectUrl;
55
	private String id;
55
	private String id;
56
	
56
	
57
	static{
57
	static{
58
		try {
58
		try {
59
			processingUrl = ConfigClient.getClient().get("ebs_processing_url"); 
-
 
60
			successUrl = ConfigClient.getClient().get("ebs_success_url");
59
			successUrl = ConfigClient.getClient().get("ebs_success_url");
61
			errorUrl = ConfigClient.getClient().get("ebs_error_url");
60
			errorUrl = ConfigClient.getClient().get("ebs_error_url");
62
			accountKey = ConfigClient.getClient().get("ebs_secret_key");
61
			accountKey = ConfigClient.getClient().get("ebs_secret_key");
63
		} catch (ConfigException e) {
62
		} catch (ConfigException e) {
64
			log.error("Unable to get success and error usr info from config server.");
63
			log.error("Unable to get success and error usr info from config server.");
Line 194... Line 193...
194
		
193
		
195
		log.info("User will be redirected to: " + this.redirectUrl);
194
		log.info("User will be redirected to: " + this.redirectUrl);
196
		return "index";
195
		return "index";
197
	}
196
	}
198
	
197
	
199
	public String show(){
-
 
200
		StringBuffer paymentData = new StringBuffer(request.getParameter("DR"));
-
 
201
		for (int i = 0; i < paymentData.length(); i++) {
-
 
202
			if (paymentData.charAt(i) == ' ')
-
 
203
				paymentData.setCharAt(i, '+');
-
 
204
		}
-
 
205
		
-
 
206
		log.info("Received data string: " + paymentData.toString());
-
 
207
		this.redirectUrl = processingUrl + paymentData.toString();
-
 
208
		return "show";
-
 
209
	}
-
 
210
	
-
 
211
	public String getId() {
198
	public String getId() {
212
		return id;
199
		return id;
213
	}
200
	}
214
 
201
 
215
	private boolean validatePaymentParams(double returnedAmount, Payment payment){
202
	private boolean validatePaymentParams(double returnedAmount, Payment payment){