Subversion Repositories SmartDukaan

Rev

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

Rev 7862 Rev 7953
Line 26... Line 26...
26
        paymentId = cps.getPaymentId();
26
        paymentId = cps.getPaymentId();
27
 
27
 
28
        if(paymentOption != null){
28
        if(paymentOption != null){
29
            List<Attribute> attributes = new ArrayList<Attribute>();
29
            List<Attribute> attributes = new ArrayList<Attribute>();
30
            attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
30
            attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
31
 
-
 
32
            try {
-
 
33
                PaymentClient paymentServiceClient = new PaymentClient();
-
 
34
                paymentServiceClient.getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, null, null, PaymentStatus.INIT, null, attributes);
-
 
35
            } catch (Exception e) {
-
 
36
                log.error("Error while saving payment option attribute", e);
-
 
37
                // TODO: We've already created the payment. We could allow the
-
 
38
                // payment to go through. The customer will be a little
-
 
39
                // annoyed to have to select from a host of options again but
-
 
40
                // will be better than completely disallowing him.
-
 
41
                return PAYMENT_NOT_CREATED;
-
 
42
            }
-
 
43
        }
31
        }
44
 
32
 
45
        return paymentId;
33
        return paymentId;
46
    }
34
    }
47
}
35
}
48
36