Subversion Repositories SmartDukaan

Rev

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

Rev 8409 Rev 8488
Line 59... Line 59...
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 EBAY_GATEWAY_ID = 16;
63
	private static final long EBAY_GATEWAY_ID = 16;
-
 
64
	private static final long SNAPDEAL_GATEWAY_ID = 18;
64
	private static final List<Long> HDFC_EMI_GATEWAY_IDS = Arrays.asList(5L,10L,11L,12L,14L);
65
	private static final List<Long> HDFC_EMI_GATEWAY_IDS = Arrays.asList(5L,10L,11L,12L,14L);
65
	
66
	
66
	ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
67
	ApplicationContext context = new ClassPathXmlApplicationContext("context.xml");
67
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
68
	PaymentHandler paymentHandler = (PaymentHandler) context.getBean("paymentHandler");
68
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
69
    PaymentRequiringExtraProcessingHandler paymentRequiringExtraProcessingHandler =
Line 407... Line 408...
407
            //Capture and update the EBS payment
408
            //Capture and update the EBS payment
408
            return captureAndUpdateEbsPayment(payment);
409
            return captureAndUpdateEbsPayment(payment);
409
        } else if (HDFC_EMI_GATEWAY_IDS.contains(gatewayId)){
410
        } else if (HDFC_EMI_GATEWAY_IDS.contains(gatewayId)){
410
            //Capture and update the HDFC EMI payment
411
            //Capture and update the HDFC EMI payment
411
            return captureAndUpdateHdfcEmiPayment(payment);
412
            return captureAndUpdateHdfcEmiPayment(payment);
412
        } else if (gatewayId == EBAY_GATEWAY_ID) {
413
        } else if (gatewayId == EBAY_GATEWAY_ID || gatewayId == SNAPDEAL_GATEWAY_ID) {
413
        	return true;
414
        	return true;
414
        }
415
        }
415
        
416
        
416
        logger.error("We have an authorized payment from unknown gateway: " + gatewayId);
417
        logger.error("We have an authorized payment from unknown gateway: " + gatewayId);
417
        return false;
418
        return false;