Subversion Repositories SmartDukaan

Rev

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

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