Subversion Repositories SmartDukaan

Rev

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

Rev 6448 Rev 6449
Line 58... Line 58...
58
    
58
    
59
	public static final long PAYMENT_NOT_CREATED = -1;
59
	public static final long PAYMENT_NOT_CREATED = -1;
60
	
60
	
61
	private static final long HDFC_GATEWAY_ID = 1;
61
	private static final long HDFC_GATEWAY_ID = 1;
62
	private static final long EBS_GATEWAY_ID = 2;
62
	private static final long EBS_GATEWAY_ID = 2;
63
	private static final long[] HDFC_EMI_GATEWAY_IDS = {5,10,11,12};
63
	private static final List<Long> HDFC_EMI_GATEWAY_IDS = Arrays.asList(5L,10L,11L,12L);
64
	
64
	
65
	ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
65
	ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
66
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
66
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
67
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
67
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
68
        (PaymentRequiringExtraProcessingHandler) context.getBean("paymentRequiringExtraProcessingHandler");
68
        (PaymentRequiringExtraProcessingHandler) context.getBean("paymentRequiringExtraProcessingHandler");
Line 327... Line 327...
327
            //Capture and update the HDFC payment
327
            //Capture and update the HDFC payment
328
            return captureAndUpdateHdfcPayment(payment);
328
            return captureAndUpdateHdfcPayment(payment);
329
        } else if (gatewayId == EBS_GATEWAY_ID){
329
        } else if (gatewayId == EBS_GATEWAY_ID){
330
            //Capture and update the EBS payment
330
            //Capture and update the EBS payment
331
            return captureAndUpdateEbsPayment(payment);
331
            return captureAndUpdateEbsPayment(payment);
332
        } else if (Arrays.asList(HDFC_EMI_GATEWAY_IDS).contains(gatewayId)){
332
        } else if (HDFC_EMI_GATEWAY_IDS.contains(gatewayId)){
333
            //Capture and update the HDFC EMI payment
333
            //Capture and update the HDFC EMI payment
334
            return captureAndUpdateHdfcEmiPayment(payment);
334
            return captureAndUpdateHdfcEmiPayment(payment);
335
        }
335
        }
336
        
336
        
337
        logger.error("We have an authorized payment from unknown gateway: " + gatewayId);
337
        logger.error("We have an authorized payment from unknown gateway: " + gatewayId);