Subversion Repositories SmartDukaan

Rev

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

Rev 3063 Rev 3126
Line 1... Line 1...
1
package in.shop2020.serving.services;
1
package in.shop2020.serving.services;
2
 
2
 
3
import in.shop2020.payments.Attribute;
3
import in.shop2020.payments.Attribute;
4
import in.shop2020.payments.PaymentStatus;
4
import in.shop2020.payments.PaymentStatus;
5
import in.shop2020.thrift.clients.PaymentServiceClient;
5
import in.shop2020.thrift.clients.PaymentClient;
6
 
6
 
7
import java.util.ArrayList;
7
import java.util.ArrayList;
8
import java.util.List;
8
import java.util.List;
9
 
9
 
10
import org.apache.log4j.Logger;
10
import org.apache.log4j.Logger;
Line 29... Line 29...
29
        if(paymentOption != null){
29
        if(paymentOption != null){
30
            List<Attribute> attributes = new ArrayList<Attribute>();
30
            List<Attribute> attributes = new ArrayList<Attribute>();
31
            attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
31
            attributes.add(new Attribute(IPaymentService.PAYMENT_METHOD, paymentOption));
32
            
32
            
33
            try {
33
            try {
34
                PaymentServiceClient paymentServiceClient = new PaymentServiceClient();
34
                PaymentClient paymentServiceClient = new PaymentClient();
35
                paymentServiceClient.getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, null, null, PaymentStatus.INIT, null, attributes);
35
                paymentServiceClient.getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, null, null, PaymentStatus.INIT, null, attributes);
36
            } catch (Exception e) {
36
            } catch (Exception e) {
37
                log.error("Error while saving payment option attribute", e);
37
                log.error("Error while saving payment option attribute", e);
38
                // TODO: We've already created the payment. We could allow the
38
                // TODO: We've already created the payment. We could allow the
39
                // payment to go through. The customer will be a little
39
                // payment to go through. The customer will be a little