Subversion Repositories SmartDukaan

Rev

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

Rev 3126 Rev 3561
Line 15... Line 15...
15
    
15
    
16
    private static int gatewayId=4;
16
    private static int gatewayId=4;
17
    private long paymentId;
17
    private long paymentId;
18
    
18
    
19
    @Override
19
    @Override
20
    public long createPayment(long currentCartId, long userId, long txnId, String paymentOption) {
20
    public long createPayment(long currentCartId, long userId, long txnId, String paymentOption, long sourceId) {
21
        log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through COD");
21
        log.info("Creating payment for the txn#: " + txnId + " for the user: " + userId + " for processing through COD");
22
        CommonPaymentService cps = new CommonPaymentService();
22
        CommonPaymentService cps = new CommonPaymentService();
23
        if(!cps.createPayment(currentCartId, userId, txnId, gatewayId)){
23
        if(!cps.createPayment(currentCartId, userId, txnId, gatewayId, sourceId)){
24
            log.error("Error while creating the basic payment");
24
            log.error("Error while creating the basic payment");
25
            return PAYMENT_NOT_CREATED;
25
            return PAYMENT_NOT_CREATED;
26
        }
26
        }
27
        paymentId = cps.getPaymentId();
27
        paymentId = cps.getPaymentId();
28
        
28