Subversion Repositories SmartDukaan

Rev

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

Rev 6431 Rev 6443
Line 327... Line 327...
327
        } catch (Exception e) {
327
        } catch (Exception e) {
328
            log.error("Error while getting payment client", e);
328
            log.error("Error while getting payment client", e);
329
            return PAYMENT_NOT_CREATED;
329
            return PAYMENT_NOT_CREATED;
330
        }
330
        }
331
        
331
        
332
        amount = rechargeOrder.getTotalAmount() - rechargeOrder.getWalletAmount();
332
        amount = rechargeOrder.getTotalAmount() - rechargeOrder.getWalletAmount() - rechargeOrder.getCouponAmount();
333
        
333
        
334
        try {
334
        try {
335
            paymentId = paymentServiceClient.getClient().createPayment(rechargeOrder.getUserId(), amount, gatewayId, rechargeOrder.getTransactionId(), true);
335
            paymentId = paymentServiceClient.getClient().createPayment(rechargeOrder.getUserId(), amount, gatewayId, rechargeOrder.getTransactionId(), true);
336
            // This is being done to ensure that the amount which we pass on to
336
            // This is being done to ensure that the amount which we pass on to
337
            // the PGs is same as what we have in the database.
337
            // the PGs is same as what we have in the database.