Subversion Repositories SmartDukaan

Rev

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

Rev 6736 Rev 7001
Line 19... Line 19...
19
import in.shop2020.thrift.clients.TransactionClient;
19
import in.shop2020.thrift.clients.TransactionClient;
20
import in.shop2020.thrift.clients.UserClient;
20
import in.shop2020.thrift.clients.UserClient;
21
import in.shop2020.utils.DataLogger;
21
import in.shop2020.utils.DataLogger;
22
 
22
 
23
import java.util.ArrayList;
23
import java.util.ArrayList;
-
 
24
import java.util.Arrays;
24
import java.util.List;
25
import java.util.List;
25
 
26
 
26
import org.apache.log4j.Logger;
27
import org.apache.log4j.Logger;
27
import org.apache.struts2.convention.annotation.InterceptorRef;
28
import org.apache.struts2.convention.annotation.InterceptorRef;
28
import org.apache.struts2.convention.annotation.InterceptorRefs;
29
import org.apache.struts2.convention.annotation.InterceptorRefs;
Line 155... Line 156...
155
 
156
 
156
    	case 5:
157
    	case 5:
157
    	case 10:
158
    	case 10:
158
    	case 11:
159
    	case 11:
159
    	case 12:
160
    	case 12:
-
 
161
    	case 14:
160
			IPaymentService hdfcEmiPaymentService = new HdfcEmiPaymentService();
162
			IPaymentService hdfcEmiPaymentService = new HdfcEmiPaymentService();
161
            paymentId = hdfcEmiPaymentService.createPayment(userinfo.getUserId(), txnId, paymentOption, gatewayId);
163
            paymentId = hdfcEmiPaymentService.createPayment(userinfo.getUserId(), txnId, paymentOption, gatewayId);
162
            if(paymentId == IPaymentService.PAYMENT_NOT_CREATED){
164
            if(paymentId == IPaymentService.PAYMENT_NOT_CREATED){
163
                addActionError("We are experiencing some problems. Please try later.");
165
                addActionError("We are experiencing some problems. Please try later.");
164
                log.error("Unable to process payment through HDFC EMI.");
166
                log.error("Unable to process payment through HDFC EMI.");
Line 412... Line 414...
412
    }
414
    }
413
    
415
    
414
    public static void main(String[] args) {
416
    public static void main(String[] args) {
415
        DesEncrypter d = new DesEncrypter("shop2020");
417
        DesEncrypter d = new DesEncrypter("shop2020");
416
        System.out.println(d.decrypt("pmkcWEzhf4IFRLyHce89Cg"));
418
        System.out.println(d.decrypt("pmkcWEzhf4IFRLyHce89Cg"));
-
 
419
    	long[] HDFC_EMI_GATEWAY_IDS = {5,10,11,12};
-
 
420
    	List<Long> stooges = Arrays.asList(5L,10L,11L,12L);
-
 
421
    	List<Long> lista = new ArrayList<Long>();
-
 
422
    	lista.add(5L);
-
 
423
    	lista.add(10L);
-
 
424
    	lista.add(11L);
-
 
425
    	lista.add(12L);
-
 
426
    	long gatewayId = 10;
-
 
427
    	if(stooges.contains(gatewayId)){
-
 
428
    		System.out.println("true");
-
 
429
    	}else{
-
 
430
    		System.out.println("false");
-
 
431
    	}
417
    }
432
    }
418
}
433
}