| Line 114... |
Line 114... |
| 114 |
try {
|
114 |
try {
|
| 115 |
userServiceClient = new UserClient();
|
115 |
userServiceClient = new UserClient();
|
| 116 |
in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
|
116 |
in.shop2020.model.v1.user.UserContextService.Client userClient = userServiceClient.getClient();
|
| 117 |
Address address = userClient.getAddressById(addressId);
|
117 |
Address address = userClient.getAddressById(addressId);
|
| 118 |
|
118 |
|
| 119 |
LogisticsClient logisticsServiceClient = new LogisticsClient();
|
- |
|
| 120 |
if(!logisticsServiceClient.getClient().isCodAllowed(address.getPin())){
|
119 |
if(!userClient.showCODOption(currentCartId, sourceId, address.getPin())){
|
| 121 |
addActionError("Cash on Delivery is currently not available for this pincode. Please choose a different payment option.");
|
120 |
addActionError("Cash on Delivery is currently not available for this pincode. Please choose a different payment option.");
|
| 122 |
return "proceed-to-pay-redirect";
|
121 |
return "proceed-to-pay-redirect";
|
| 123 |
}
|
122 |
}
|
| 124 |
} catch (Exception e) {
|
123 |
} catch (Exception e) {
|
| 125 |
log.error("Unable to talk to the user context service.", e);
|
124 |
log.error("Unable to talk to the user context service.", e);
|