Subversion Repositories SmartDukaan

Rev

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

Rev 4645 Rev 4651
Line 57... Line 57...
57
	
57
	
58
	private static final long HDFC_GATEWAY_ID = 1;
58
	private static final long HDFC_GATEWAY_ID = 1;
59
	private static final long EBS_GATEWAY_ID = 2;
59
	private static final long EBS_GATEWAY_ID = 2;
60
	private static final long HDFC_EMI_GATEWAY_ID = 5;
60
	private static final long HDFC_EMI_GATEWAY_ID = 5;
61
	
61
	
62
	public ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
62
	ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
63
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
63
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
64
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
64
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
65
        (PaymentRequiringExtraProcessingHandler) context.getBean("paymentRequiringExtraProcessingHandler");
65
        (PaymentRequiringExtraProcessingHandler) context.getBean("paymentRequiringExtraProcessingHandler");
66
 
66
 
67
    PaymentGatewayHandler paymentGatewayHandler = (PaymentGatewayHandler) context.getBean("paymentGatewayHandler");
67
    PaymentGatewayHandler paymentGatewayHandler = (PaymentGatewayHandler) context.getBean("paymentGatewayHandler");
68
	RefundHandler refundHandler = (RefundHandler) context.getBean("refundHandler");
68
	RefundHandler refundHandler = (RefundHandler) context.getBean("refundHandler");
69
 
69
 
-
 
70
	public void setDataSourceUrl(String dbHost){
-
 
71
		org.apache.commons.dbcp.BasicDataSource ds = (org.apache.commons.dbcp.BasicDataSource)context.getBean("dataSource");
-
 
72
		ds.setUrl(dbHost);
-
 
73
	}
-
 
74
	
-
 
75
	public String getDataSourceUrl(){
-
 
76
		org.apache.commons.dbcp.BasicDataSource ds = (org.apache.commons.dbcp.BasicDataSource)context.getBean("dataSource");
-
 
77
		return ds.getUrl();
-
 
78
	}
-
 
79
	
70
	@Override
80
	@Override
71
	public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException {
81
	public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException {
72
	    logger.info("Creating payment corresponding to our txn id:" + txnId);
82
	    logger.info("Creating payment corresponding to our txn id:" + txnId);
73
		in.shop2020.payment.domain.Payment payment = new in.shop2020.payment.domain.Payment();
83
		in.shop2020.payment.domain.Payment payment = new in.shop2020.payment.domain.Payment();
74
		payment.setUserId(userId);
84
		payment.setUserId(userId);