Subversion Repositories SmartDukaan

Rev

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

Rev 10269 Rev 10968
Line 33... Line 33...
33
		}
33
		}
34
	}
34
	}
35
	
35
	
36
	public long createPayment(RechargeOrder rechargeOrder, String paymentOption, String phone) {
36
	public long createPayment(RechargeOrder rechargeOrder, String paymentOption, String phone) {
37
	    log.info("Creating payment for the txn#: " + rechargeOrder.getId() + " for the user: " + rechargeOrder.getUserId() + " for processing through HDFC");
37
	    log.info("Creating payment for the txn#: " + rechargeOrder.getId() + " for the user: " + rechargeOrder.getUserId() + " for processing through HDFC");
-
 
38
	    log.info("createPayment phone---- " + phone);
38
        CommonPaymentService cps = new CommonPaymentService();
39
        CommonPaymentService cps = new CommonPaymentService();
39
        if(!cps.createPayment(rechargeOrder, gatewayId)){
40
        if(!cps.createPayment(rechargeOrder, gatewayId)){
40
            log.error("Error while creating the basic payment");
41
            log.error("Error while creating the basic payment");
41
            return PAYMENT_NOT_CREATED;
42
            return PAYMENT_NOT_CREATED;
42
        }else{
43
        }else{
Line 46... Line 47...
46
	
47
	
47
	private long initializePayment(RechargeOrder rechargeOrder, long merchantPaymentId,
48
	private long initializePayment(RechargeOrder rechargeOrder, long merchantPaymentId,
48
            String paymentOption, String phone) {
49
            String paymentOption, String phone) {
49
	    List<Attribute> attributes = new ArrayList<Attribute>();
50
	    List<Attribute> attributes = new ArrayList<Attribute>();
50
        attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
51
        attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
-
 
52
        log.info("initializePayment phone---- " + phone);
51
        PaymentClient paymentServiceClient = null;
53
        PaymentClient paymentServiceClient = null;
52
        try {
54
        try {
53
            paymentServiceClient = new PaymentClient();
55
            paymentServiceClient = new PaymentClient();
54
        } catch (Exception e) {
56
        } catch (Exception e) {
55
            log.error("Error while getting payment client", e);
57
            log.error("Error while getting payment client", e);