| 2674 |
vikas |
1 |
package in.shop2020.serving.controllers;
|
|
|
2 |
|
| 7065 |
kshitij.so |
3 |
import in.shop2020.config.ConfigException;
|
| 4689 |
anupam.sin |
4 |
import in.shop2020.crm.Activity;
|
|
|
5 |
import in.shop2020.crm.ActivityType;
|
| 3578 |
mandeep.dh |
6 |
import in.shop2020.crm.SearchFilter;
|
|
|
7 |
import in.shop2020.crm.Ticket;
|
|
|
8 |
import in.shop2020.crm.TicketCategory;
|
| 4689 |
anupam.sin |
9 |
import in.shop2020.crm.TicketPriority;
|
| 3578 |
mandeep.dh |
10 |
import in.shop2020.crm.TicketStatus;
|
| 7826 |
manish.sha |
11 |
import in.shop2020.logistics.LogisticsServiceException;
|
| 5845 |
mandeep.dh |
12 |
import in.shop2020.logistics.PickupStore;
|
| 7826 |
manish.sha |
13 |
import in.shop2020.logistics.Provider;
|
| 7190 |
amar.kumar |
14 |
import in.shop2020.model.v1.catalog.CatalogService;
|
|
|
15 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
|
|
16 |
import in.shop2020.model.v1.catalog.Item;
|
| 7826 |
manish.sha |
17 |
import in.shop2020.model.v1.order.AmazonOrder;
|
| 7399 |
anupam.sin |
18 |
import in.shop2020.model.v1.order.HotspotStore;
|
| 2674 |
vikas |
19 |
import in.shop2020.model.v1.order.LineItem;
|
|
|
20 |
import in.shop2020.model.v1.order.Order;
|
| 8606 |
amar.kumar |
21 |
import in.shop2020.model.v1.order.OrderSource;
|
| 3578 |
mandeep.dh |
22 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 7393 |
anupam.sin |
23 |
import in.shop2020.model.v1.order.StoreOrderDetail;
|
| 4689 |
anupam.sin |
24 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 4142 |
mandeep.dh |
25 |
import in.shop2020.model.v1.user.Address;
|
| 4689 |
anupam.sin |
26 |
import in.shop2020.model.v1.user.UserContextException;
|
| 2728 |
vikas |
27 |
import in.shop2020.payments.Attribute;
|
|
|
28 |
import in.shop2020.payments.Constants;
|
| 2674 |
vikas |
29 |
import in.shop2020.payments.Payment;
|
| 2728 |
vikas |
30 |
import in.shop2020.payments.PaymentException;
|
| 4142 |
mandeep.dh |
31 |
import in.shop2020.payments.PaymentService.Client;
|
| 4689 |
anupam.sin |
32 |
import in.shop2020.serving.auth.CRMAuthorizingRealm;
|
| 3090 |
mandeep.dh |
33 |
import in.shop2020.serving.model.ShipmentUpdate;
|
| 5845 |
mandeep.dh |
34 |
import in.shop2020.serving.services.AramexTrackingService;
|
| 3090 |
mandeep.dh |
35 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
| 5303 |
phani.kuma |
36 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
| 7942 |
manish.sha |
37 |
import in.shop2020.serving.services.FedExTrackingService;
|
| 7200 |
kshitij.so |
38 |
import in.shop2020.serving.services.RedExpressTrackingService;
|
| 3578 |
mandeep.dh |
39 |
import in.shop2020.thrift.clients.CRMClient;
|
| 7190 |
amar.kumar |
40 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 6322 |
amar.kumar |
41 |
import in.shop2020.thrift.clients.HelperClient;
|
| 5845 |
mandeep.dh |
42 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 3128 |
rajveer |
43 |
import in.shop2020.thrift.clients.PaymentClient;
|
|
|
44 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 4142 |
mandeep.dh |
45 |
import in.shop2020.thrift.clients.UserClient;
|
| 7065 |
kshitij.so |
46 |
import in.shop2020.thrift.clients.config.ConfigClient;
|
| 7942 |
manish.sha |
47 |
import in.shop2020.utils.FedExShipAccountInfo;
|
| 3546 |
mandeep.dh |
48 |
import in.shop2020.utils.ModelUtils;
|
| 6322 |
amar.kumar |
49 |
import in.shop2020.warehouse.WarehouseService;
|
| 2674 |
vikas |
50 |
|
| 6322 |
amar.kumar |
51 |
import java.io.BufferedInputStream;
|
|
|
52 |
import java.io.File;
|
|
|
53 |
import java.io.FileInputStream;
|
|
|
54 |
import java.io.FileWriter;
|
|
|
55 |
import java.io.IOException;
|
|
|
56 |
import java.io.InputStream;
|
| 6912 |
anupam.sin |
57 |
import java.text.SimpleDateFormat;
|
| 2674 |
vikas |
58 |
import java.util.ArrayList;
|
| 8824 |
manish.sha |
59 |
import java.util.Arrays;
|
| 6912 |
anupam.sin |
60 |
import java.util.Calendar;
|
| 4416 |
mandeep.dh |
61 |
import java.util.Collections;
|
| 6912 |
anupam.sin |
62 |
import java.util.Date;
|
| 7836 |
anupam.sin |
63 |
import java.util.HashMap;
|
| 4689 |
anupam.sin |
64 |
import java.util.HashSet;
|
| 2674 |
vikas |
65 |
import java.util.List;
|
| 7836 |
anupam.sin |
66 |
import java.util.Map;
|
| 4689 |
anupam.sin |
67 |
import java.util.Set;
|
| 4416 |
mandeep.dh |
68 |
import java.util.concurrent.Callable;
|
|
|
69 |
import java.util.concurrent.Executors;
|
|
|
70 |
import java.util.concurrent.TimeUnit;
|
| 2674 |
vikas |
71 |
|
| 6322 |
amar.kumar |
72 |
import javax.servlet.ServletOutputStream;
|
|
|
73 |
|
| 4689 |
anupam.sin |
74 |
import net.htmlparser.jericho.Source;
|
|
|
75 |
|
| 5845 |
mandeep.dh |
76 |
import org.apache.commons.lang.StringUtils;
|
| 2674 |
vikas |
77 |
import org.apache.log4j.Logger;
|
| 8824 |
manish.sha |
78 |
import org.apache.shiro.SecurityUtils;
|
|
|
79 |
import org.apache.struts2.convention.annotation.Result;
|
|
|
80 |
import org.apache.struts2.convention.annotation.Results;
|
| 2728 |
vikas |
81 |
import org.apache.thrift.TException;
|
| 4142 |
mandeep.dh |
82 |
import org.apache.thrift.transport.TTransportException;
|
| 2674 |
vikas |
83 |
|
| 7942 |
manish.sha |
84 |
import com.ShipWebServiceClient;
|
|
|
85 |
import com.fedex.ship.stub.CompletedPackageDetail;
|
|
|
86 |
import com.fedex.ship.stub.CompletedShipmentDetail;
|
|
|
87 |
import com.fedex.ship.stub.ProcessShipmentReply;
|
|
|
88 |
import com.fedex.ship.stub.TrackingId;
|
|
|
89 |
|
| 2674 |
vikas |
90 |
/**
|
|
|
91 |
* @author vikas
|
| 3578 |
mandeep.dh |
92 |
*
|
| 2674 |
vikas |
93 |
*/
|
|
|
94 |
@SuppressWarnings("serial")
|
|
|
95 |
public class UserOrderInfoController extends BaseController {
|
| 7372 |
kshitij.so |
96 |
private static Logger log = Logger.getLogger(Class.class);
|
|
|
97 |
private static BlueDartTrackingService blueDartTrackingService = new BlueDartTrackingService();
|
|
|
98 |
private static AramexTrackingService aramexTrackingService = new AramexTrackingService();
|
|
|
99 |
private static DelhiveryTrackingService delhiveryTrackingService = new DelhiveryTrackingService();
|
|
|
100 |
private static RedExpressTrackingService redexpressTrackingService = new RedExpressTrackingService();
|
| 7942 |
manish.sha |
101 |
//Start:- Added by Manish Sharma for fedex Integration- Shipment Tracking on 31-Jul-2013
|
|
|
102 |
private static FedExTrackingService fedexTrackingService = new FedExTrackingService();
|
|
|
103 |
//End:- Added by Manish Sharma for fedex Integration- Shipment Tracking on 31-Jul-2013
|
|
|
104 |
|
| 7372 |
kshitij.so |
105 |
private long orderId;
|
|
|
106 |
private Order order;
|
|
|
107 |
private List<Payment> payments;
|
|
|
108 |
private List<ShipmentUpdate> shipmentUpdates = new ArrayList<ShipmentUpdate>();
|
|
|
109 |
private Long codTicketId;
|
|
|
110 |
private List<Address> addresses;
|
|
|
111 |
private Set<OrderStatus> setOfcancellableStates;
|
| 8824 |
manish.sha |
112 |
//Start:- Added by Manish Sharma for Physical Refunds
|
|
|
113 |
private Set<OrderStatus> setOfrefundableStates;
|
| 8848 |
manish.sha |
114 |
private Set<OrderStatus> setOfprepaidrefundableStates;
|
| 8824 |
manish.sha |
115 |
//End:- Added by Manish Sharma for Physical Refunds
|
| 7372 |
kshitij.so |
116 |
private String cancellationInitiator;
|
|
|
117 |
private String cancelReason;
|
|
|
118 |
private String body;
|
|
|
119 |
private String line1;
|
|
|
120 |
private String line2;
|
|
|
121 |
private String city;
|
|
|
122 |
private String state;
|
|
|
123 |
private String pin;
|
|
|
124 |
private String freebieItem;
|
|
|
125 |
private String dealText;
|
|
|
126 |
private String parentOrderIdForFreebieOrder;
|
|
|
127 |
private String freebieOrderId;
|
| 7393 |
anupam.sin |
128 |
private double cashAmount;
|
|
|
129 |
private double cardAmount;
|
|
|
130 |
private StoreOrderDetail storeOrderDetail;
|
| 7826 |
manish.sha |
131 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 7830 |
anupam.sin |
132 |
private AmazonOrder amazonOrder = null;
|
| 7836 |
anupam.sin |
133 |
private String providerName = "N/A";
|
| 7826 |
manish.sha |
134 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 8296 |
kshitij.so |
135 |
private long gvAmount;
|
| 8824 |
manish.sha |
136 |
//Start:- Added by Manish Sharma for Physical Refunds
|
|
|
137 |
private String rfdRadio;
|
|
|
138 |
private String couponDetails;
|
|
|
139 |
private String refundAmountCoupon;
|
|
|
140 |
private String chequeDetails;
|
|
|
141 |
private String refundAmountCheque;
|
|
|
142 |
private String refundAmountGateway;
|
|
|
143 |
private String comments;
|
|
|
144 |
|
|
|
145 |
private String errorMsg = "";
|
|
|
146 |
private String successmsg = "";
|
| 8860 |
manish.sha |
147 |
|
|
|
148 |
private List<String> refundDetails;
|
| 8824 |
manish.sha |
149 |
//End:- Added by Manish Sharma for Physical Refunds
|
| 2674 |
vikas |
150 |
|
| 7372 |
kshitij.so |
151 |
public UserOrderInfoController() {
|
|
|
152 |
super();
|
|
|
153 |
setOfcancellableStates = new HashSet<OrderStatus>();
|
|
|
154 |
setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
|
|
|
155 |
setOfcancellableStates.add(OrderStatus.INVENTORY_LOW);
|
|
|
156 |
setOfcancellableStates.add(OrderStatus.LOW_INV_PO_RAISED);
|
|
|
157 |
setOfcancellableStates.add(OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
|
|
|
158 |
setOfcancellableStates.add(OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
|
|
|
159 |
setOfcancellableStates.add(OrderStatus.ACCEPTED);
|
|
|
160 |
setOfcancellableStates.add(OrderStatus.BILLED);
|
| 8824 |
manish.sha |
161 |
|
|
|
162 |
//Start:- Added by Manish Sharma for Physical Refunds
|
|
|
163 |
setOfrefundableStates = new HashSet<OrderStatus>();
|
|
|
164 |
setOfrefundableStates.add(OrderStatus.DOA_VALID_REFUNDED);
|
|
|
165 |
setOfrefundableStates.add(OrderStatus.DOA_INVALID_REFUNDED);
|
|
|
166 |
setOfrefundableStates.add(OrderStatus.DOA_REFUNDED_RCVD_DAMAGED);
|
|
|
167 |
setOfrefundableStates.add(OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT);
|
|
|
168 |
setOfrefundableStates.add(OrderStatus.RTO_DAMAGED_REFUNDED);
|
|
|
169 |
setOfrefundableStates.add(OrderStatus.RET_PRODUCT_USABLE_REFUNDED);
|
|
|
170 |
setOfrefundableStates.add(OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED);
|
|
|
171 |
setOfrefundableStates.add(OrderStatus.RET_REFUNDED_RCVD_DAMAGED);
|
|
|
172 |
setOfrefundableStates.add(OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT);
|
|
|
173 |
//End:- Added by Manish Sharma for Physical Refunds
|
|
|
174 |
|
| 8848 |
manish.sha |
175 |
setOfprepaidrefundableStates = new HashSet<OrderStatus>();
|
|
|
176 |
setOfprepaidrefundableStates.add(OrderStatus.RTO_REFUNDED);
|
|
|
177 |
setOfprepaidrefundableStates.add(OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED);
|
|
|
178 |
setOfprepaidrefundableStates.add(OrderStatus.LOST_IN_TRANSIT_REFUNDED);
|
|
|
179 |
setOfprepaidrefundableStates.add(OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST);
|
|
|
180 |
setOfprepaidrefundableStates.add(OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
|
| 8824 |
manish.sha |
181 |
|
| 8848 |
manish.sha |
182 |
|
| 7372 |
kshitij.so |
183 |
}
|
| 7836 |
anupam.sin |
184 |
|
|
|
185 |
public static final Map<Long, String> providerNameMap = new HashMap<Long, String>() {
|
|
|
186 |
{
|
|
|
187 |
put(1l, "BlueDart");
|
|
|
188 |
put(2l, "Aramex");
|
|
|
189 |
put(3l, "Delhivery");
|
|
|
190 |
put(4l, "SelfPickup");
|
|
|
191 |
put(5l, "Runner");
|
|
|
192 |
put(6l, "RedExpress");
|
| 8356 |
manish.sha |
193 |
put(7l, "FedEx");
|
| 7836 |
anupam.sin |
194 |
}
|
|
|
195 |
};
|
|
|
196 |
|
| 7372 |
kshitij.so |
197 |
public String index() {
|
|
|
198 |
try {
|
|
|
199 |
PaymentClient paymentServiceClient = new PaymentClient();
|
|
|
200 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 7826 |
manish.sha |
201 |
LogisticsClient logisticsServiceClient = new LogisticsClient();
|
|
|
202 |
|
| 8824 |
manish.sha |
203 |
/*List<Provider> providerList = logisticsServiceClient.getClient().getAllProviders();
|
|
|
204 |
Map<Long, String> providerNameMap = new HashMap<Long, String>();
|
|
|
205 |
for(Provider provider : providerList){
|
|
|
206 |
providerNameMap.put(provider.getId(), provider.getName());
|
|
|
207 |
}*/
|
| 7372 |
kshitij.so |
208 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
| 7826 |
manish.sha |
209 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 7830 |
anupam.sin |
210 |
try {
|
|
|
211 |
amazonOrder = transactionServiceClient.getClient().getAmazonOrder(orderId);
|
|
|
212 |
} catch (Exception e) {
|
| 7959 |
anupam.sin |
213 |
log.error("Exception : No Amazon order found with orderId " + orderId);
|
| 7830 |
anupam.sin |
214 |
}
|
| 7836 |
anupam.sin |
215 |
if (order.getLogistics_provider_id() > 0) {
|
|
|
216 |
setProviderName(providerNameMap.get(order.getLogistics_provider_id()));
|
|
|
217 |
}
|
| 7826 |
manish.sha |
218 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
| 7393 |
anupam.sin |
219 |
if(order.getSource() == 2) {
|
|
|
220 |
storeOrderDetail = transactionServiceClient.getClient().getStoreOrderDetail(order.getId(),order.getStoreId());
|
| 7399 |
anupam.sin |
221 |
if(order.getStatus().getValue() == 15 || order.getStatus().getValue() == 34) {
|
|
|
222 |
setCashAmount(storeOrderDetail.getCashRefundAmount());
|
|
|
223 |
setCardAmount(storeOrderDetail.getCardRefundAmount());
|
|
|
224 |
} else {
|
|
|
225 |
setCashAmount(storeOrderDetail.getCashAmount());
|
|
|
226 |
setCardAmount(storeOrderDetail.getCardAmount());
|
|
|
227 |
}
|
| 7393 |
anupam.sin |
228 |
}
|
| 7372 |
kshitij.so |
229 |
if(order.getFreebieItemId()>0) {
|
|
|
230 |
CatalogService.Client catalogClient = new CatalogClient().getClient();
|
|
|
231 |
Item item = catalogClient.getItem(order.getFreebieItemId());
|
|
|
232 |
freebieItem = item.getBrand() + " " + item.getModelName() + " " + item.getModelNumber() + " " + item.getColor();
|
|
|
233 |
}
|
| 3090 |
mandeep.dh |
234 |
|
| 7372 |
kshitij.so |
235 |
if(order.getLineitems().get(0).getDealText()!=null && !order.getLineitems().get(0).getDealText().isEmpty()) {
|
|
|
236 |
dealText = order.getLineitems().get(0).getDealText();
|
|
|
237 |
}
|
|
|
238 |
List<in.shop2020.model.v1.order.Attribute> attributes =
|
|
|
239 |
transactionServiceClient.getClient().getAllAttributesForOrderId(orderId);
|
| 3578 |
mandeep.dh |
240 |
|
| 7372 |
kshitij.so |
241 |
for(in.shop2020.model.v1.order.Attribute attribute: attributes){
|
|
|
242 |
if(attribute.getName().equals("parentOrderIdForFreebie")){
|
|
|
243 |
parentOrderIdForFreebieOrder = attribute.getValue();
|
|
|
244 |
} else if (attribute.getName().equals("freebieOrderId")){
|
|
|
245 |
freebieOrderId = attribute.getValue();
|
|
|
246 |
}
|
|
|
247 |
}
|
| 4689 |
anupam.sin |
248 |
|
| 7372 |
kshitij.so |
249 |
payments = paymentServiceClient.getClient()
|
|
|
250 |
.getPaymentForTxnId(order.getTransactionId());
|
| 8296 |
kshitij.so |
251 |
|
|
|
252 |
gvAmount = order.getGvAmount();
|
| 4689 |
anupam.sin |
253 |
|
| 4416 |
mandeep.dh |
254 |
|
| 3578 |
mandeep.dh |
255 |
|
| 7372 |
kshitij.so |
256 |
// Spawning a thread to capture shipment updates from Bluedart
|
|
|
257 |
// This is done to ensure that response from Crm web app is sent
|
|
|
258 |
// within given time limits. Also, we wont be affected in the cases
|
|
|
259 |
// where bluedart site is down or slow
|
|
|
260 |
Executors.newSingleThreadExecutor().invokeAll(Collections.singletonList(new Callable<Boolean>() {
|
|
|
261 |
public Boolean call() throws Exception {
|
|
|
262 |
if (order.getLogistics_provider_id() == 1)
|
|
|
263 |
shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
|
|
|
264 |
else if (order.getLogistics_provider_id() == 2) {
|
|
|
265 |
shipmentUpdates = aramexTrackingService.getUpdates(order.getAirwaybill_no());
|
|
|
266 |
}
|
|
|
267 |
else if (order.getLogistics_provider_id() == 3) {
|
|
|
268 |
shipmentUpdates = delhiveryTrackingService.getUpdates(order.getAirwaybill_no());
|
|
|
269 |
}
|
|
|
270 |
else if (order.getLogistics_provider_id() == 6) {
|
|
|
271 |
shipmentUpdates = redexpressTrackingService.getUpdates(order.getAirwaybill_no());
|
|
|
272 |
}
|
| 7942 |
manish.sha |
273 |
//Start:- Added by Manish Sharma for fedex Integration- Shipment Tracking on 31-Jul-2013
|
|
|
274 |
else if (order.getLogistics_provider_id() == 7) {
|
|
|
275 |
shipmentUpdates = fedexTrackingService.getUpdates(order.getAirwaybill_no());
|
|
|
276 |
}
|
|
|
277 |
//End:- Added by Manish Sharma for fedex Integration- Shipment Tracking on 31-Jul-2013
|
| 7372 |
kshitij.so |
278 |
else {
|
|
|
279 |
shipmentUpdates = new ArrayList<ShipmentUpdate>();
|
|
|
280 |
log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
|
|
|
281 |
}
|
|
|
282 |
return true;
|
|
|
283 |
}
|
|
|
284 |
}), 60, TimeUnit.SECONDS);
|
| 2674 |
vikas |
285 |
|
| 7372 |
kshitij.so |
286 |
if (order.isCod() && OrderStatus.COD_VERIFICATION_PENDING.equals(order.getStatus())) {
|
|
|
287 |
populateCODTicketId(order.getCustomer_id());
|
|
|
288 |
}
|
| 4142 |
mandeep.dh |
289 |
|
| 7372 |
kshitij.so |
290 |
if (canEditOrderAddress()) {
|
|
|
291 |
userContextServiceClient = new UserClient().getClient();
|
|
|
292 |
addresses = userContextServiceClient.getAllAddressesForUser(order.getCustomer_id());
|
|
|
293 |
}
|
| 3578 |
mandeep.dh |
294 |
|
| 7372 |
kshitij.so |
295 |
} catch (TTransportException e) {
|
|
|
296 |
log.error("Unable to create thrift Client", e);
|
|
|
297 |
} catch (TransactionServiceException e) {
|
|
|
298 |
addActionError("Invalid order id or no order selected.");
|
|
|
299 |
} catch (TException e) {
|
|
|
300 |
log.error("Unable to get thrift Client", e);
|
|
|
301 |
} catch (PaymentException e) {
|
|
|
302 |
log.error("Unable to get payments for transctionId : " + order.getTransactionId(), e);
|
|
|
303 |
} catch (InterruptedException e) {
|
|
|
304 |
log.error("Thread was interrupted", e);
|
|
|
305 |
} catch (UserContextException e) {
|
|
|
306 |
log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
|
|
|
307 |
} catch(CatalogServiceException csex) {
|
|
|
308 |
log.error("Unable to get item details for itemId: " + order.getFreebieItemId(), csex);
|
| 8824 |
manish.sha |
309 |
} /*catch (LogisticsServiceException lsex) {
|
|
|
310 |
log.error("Unable to get providers infromation: " , lsex);
|
|
|
311 |
}*/
|
| 7372 |
kshitij.so |
312 |
return INDEX;
|
|
|
313 |
}
|
| 4689 |
anupam.sin |
314 |
|
| 7372 |
kshitij.so |
315 |
private boolean canEditOrderAddress() {
|
|
|
316 |
return false;
|
|
|
317 |
}
|
| 4689 |
anupam.sin |
318 |
|
| 7372 |
kshitij.so |
319 |
private void populateCODTicketId(long customerId) {
|
|
|
320 |
try {
|
|
|
321 |
SearchFilter searchFilter = new SearchFilter();
|
|
|
322 |
searchFilter.setTicketCategory(TicketCategory.COD_VERIFICATION);
|
|
|
323 |
searchFilter.setTicketStatuses(new ArrayList<TicketStatus>());
|
|
|
324 |
searchFilter.getTicketStatuses().add(TicketStatus.OPEN);
|
|
|
325 |
searchFilter.getTicketStatuses().add(TicketStatus.REOPEN);
|
|
|
326 |
searchFilter.setCustomerId(customerId);
|
|
|
327 |
crmServiceClient = new CRMClient().getClient();
|
|
|
328 |
List<Ticket> tickets = crmServiceClient.getTickets(searchFilter);
|
|
|
329 |
if (tickets != null && !tickets.isEmpty()) {
|
|
|
330 |
codTicketId = tickets.get(0).getId();
|
|
|
331 |
}
|
|
|
332 |
} catch (TException e) {
|
|
|
333 |
log.error("Error fetching tickets for customerId: " + customerId, e);
|
|
|
334 |
}
|
|
|
335 |
}
|
| 4689 |
anupam.sin |
336 |
|
| 7372 |
kshitij.so |
337 |
public String markOrderForCancellation() {
|
|
|
338 |
try{
|
|
|
339 |
TransactionClient transactionServiceClient = new TransactionClient();
|
|
|
340 |
log.info("URL = " + request.getRequestURI());
|
|
|
341 |
log.info("Initiator = " + request.getParameter("cancellationInitiator"));
|
|
|
342 |
log.info("orderId = " + request.getParameter("orderId"));
|
| 7393 |
anupam.sin |
343 |
|
|
|
344 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
|
|
345 |
|
| 7499 |
anupam.sin |
346 |
/**
|
|
|
347 |
* If the order is from store then refund the order directly.
|
|
|
348 |
*/
|
| 7393 |
anupam.sin |
349 |
if (order.getSource() == 2) {
|
|
|
350 |
String plainTextbody = "";
|
|
|
351 |
if(body!=null && !body.isEmpty()){
|
|
|
352 |
plainTextbody = new Source(body).getTextExtractor().toString();
|
|
|
353 |
}
|
| 7612 |
anupam.sin |
354 |
|
|
|
355 |
if(cashAmount + cardAmount > order.getAdvanceAmount()) {
|
|
|
356 |
log.error("Could not mark order for Cancellation, OrderId : " + orderId);
|
|
|
357 |
return "index";
|
|
|
358 |
}
|
|
|
359 |
|
|
|
360 |
transactionServiceClient.getClient().saveRefundAmountsForStoreOrder(orderId, order.getStoreId(), cashAmount, cardAmount);
|
| 7399 |
anupam.sin |
361 |
if (cancellationInitiator.equals("CUSTOMER")) {
|
|
|
362 |
transactionServiceClient.getClient().markOrderCancellationRequestReceived(orderId);
|
|
|
363 |
transactionServiceClient.getClient().markOrderCancellationRequestConfirmed(orderId);
|
|
|
364 |
}
|
| 7393 |
anupam.sin |
365 |
transactionServiceClient.getClient().refundOrder(orderId, currentAgentEmailId, cancelReason + " : " + plainTextbody);
|
| 7499 |
anupam.sin |
366 |
} else {
|
|
|
367 |
if (cancellationInitiator.equals("CUSTOMER")) {
|
|
|
368 |
transactionServiceClient.getClient().markOrderCancellationRequestReceived(orderId);
|
|
|
369 |
long creatorId = CRMAuthorizingRealm.getAgent(currentAgentEmailId).getId();
|
|
|
370 |
Ticket ticket = new Ticket();
|
|
|
371 |
String plainTextbody = "";
|
|
|
372 |
if(body!=null && !body.isEmpty()){
|
|
|
373 |
plainTextbody = new Source(body).getTextExtractor().toString();
|
|
|
374 |
}
|
|
|
375 |
ticket.setDescription("Creating ticket for Cancellation Request Received, Reason : " + cancelReason + " : " + plainTextbody);
|
|
|
376 |
ticket.setCreatorId(creatorId);
|
|
|
377 |
ticket.setStatus(TicketStatus.OPEN);
|
|
|
378 |
ticket.setPriority(TicketPriority.HIGH);
|
|
|
379 |
ticket.setCategory(TicketCategory.ORDER_CANCELLATION);
|
|
|
380 |
ticket.setOrderId(orderId);
|
| 4689 |
anupam.sin |
381 |
|
| 7499 |
anupam.sin |
382 |
Activity activity = new Activity();
|
|
|
383 |
activity.setDescription("Creating Ticket");
|
|
|
384 |
activity.setType(ActivityType.OTHER);
|
|
|
385 |
activity.setTicketPriority(TicketPriority.HIGH);
|
|
|
386 |
activity.setTicketStatus(TicketStatus.OPEN);
|
|
|
387 |
activity.setCreatorId(creatorId);
|
|
|
388 |
activity.setTicketDescription("Creating ticket for Cancellation Request Received, Reason : " + cancelReason + " : " + plainTextbody);
|
|
|
389 |
activity.setTicketCategory(TicketCategory.ORDER_CANCELLATION);
|
| 4689 |
anupam.sin |
390 |
|
| 7499 |
anupam.sin |
391 |
ticket.setCustomerId(order.getCustomer_id());
|
|
|
392 |
activity.setCustomerId(order.getCustomer_id());
|
|
|
393 |
ticket.setCustomerName(order.getCustomer_name());
|
|
|
394 |
activity.setCustomerName(order.getCustomer_name());
|
|
|
395 |
ticket.setCustomerEmailId(order.getCustomer_email());
|
|
|
396 |
activity.setCustomerEmailId(order.getCustomer_email());
|
|
|
397 |
ticket.setCustomerMobileNumber(order.getCustomer_mobilenumber());
|
|
|
398 |
activity.setCustomerMobileNumber(order.getCustomer_mobilenumber());
|
| 4689 |
anupam.sin |
399 |
|
| 7499 |
anupam.sin |
400 |
crmServiceClient = new CRMClient().getClient();
|
|
|
401 |
crmServiceClient.insertTicket(ticket, activity);
|
|
|
402 |
}
|
|
|
403 |
else if (cancellationInitiator.equals("INTERNAL")) {
|
|
|
404 |
String plainTextbody = "";
|
|
|
405 |
if(body!=null && !body.isEmpty()){
|
|
|
406 |
plainTextbody = new Source(body).getTextExtractor().toString();
|
|
|
407 |
}
|
|
|
408 |
boolean status_returned = transactionServiceClient.getClient().refundOrder(orderId, currentAgentEmailId, cancelReason + " : " + plainTextbody);
|
|
|
409 |
if (status_returned) {
|
|
|
410 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
|
|
411 |
long creatorId = CRMAuthorizingRealm.getAgent(currentAgentEmailId).getId();
|
|
|
412 |
Ticket ticket = new Ticket();
|
|
|
413 |
ticket.setDescription("Creating ticket for Order Cancellation due to Low inventory");
|
|
|
414 |
ticket.setCreatorId(creatorId);
|
|
|
415 |
ticket.setAssigneeId(36);
|
|
|
416 |
ticket.setStatus(TicketStatus.OPEN);
|
|
|
417 |
ticket.setPriority(TicketPriority.MEDIUM);
|
|
|
418 |
ticket.setCategory(TicketCategory.LOW_INVENTORY_CANCELLED_ORDERS);
|
|
|
419 |
ticket.setOrderId(orderId);
|
|
|
420 |
ticket.setCustomerId(order.getCustomer_id());
|
|
|
421 |
ticket.setCustomerName(order.getCustomer_name());
|
|
|
422 |
ticket.setCustomerEmailId(order.getCustomer_email());
|
|
|
423 |
ticket.setCustomerMobileNumber(order.getCustomer_mobilenumber());
|
| 6322 |
amar.kumar |
424 |
|
| 7499 |
anupam.sin |
425 |
Activity activity = new Activity();
|
|
|
426 |
activity.setDescription("Creating Ticket");
|
|
|
427 |
activity.setType(ActivityType.OTHER);
|
|
|
428 |
activity.setTicketPriority(TicketPriority.MEDIUM);
|
|
|
429 |
activity.setTicketStatus(TicketStatus.OPEN);
|
|
|
430 |
activity.setCreatorId(creatorId);
|
|
|
431 |
activity.setTicketAssigneeId(36);
|
|
|
432 |
activity.setTicketCategory(TicketCategory.LOW_INVENTORY_CANCELLED_ORDERS);
|
|
|
433 |
activity.setTicketDescription("Creating ticket for Order Cancellation due to Low inventory");
|
|
|
434 |
activity.setCustomerId(order.getCustomer_id());
|
|
|
435 |
activity.setCustomerName(order.getCustomer_name());
|
|
|
436 |
activity.setCustomerEmailId(order.getCustomer_email());
|
|
|
437 |
activity.setCustomerMobileNumber(order.getCustomer_mobilenumber());
|
| 6322 |
amar.kumar |
438 |
|
| 7499 |
anupam.sin |
439 |
crmServiceClient = new CRMClient().getClient();
|
|
|
440 |
crmServiceClient.insertTicket(ticket, activity);
|
|
|
441 |
}
|
|
|
442 |
}
|
| 7372 |
kshitij.so |
443 |
}
|
|
|
444 |
} catch(Exception e) {
|
|
|
445 |
log.error("Could not mark order for Cancellation, OrderId : " + orderId, e);
|
|
|
446 |
}
|
|
|
447 |
return index();
|
|
|
448 |
}
|
| 7221 |
kshitij.so |
449 |
|
| 7372 |
kshitij.so |
450 |
public void getOrderConfirmationMail() throws IOException, TException, ConfigException, TransactionServiceException {
|
|
|
451 |
TransactionClient transactionServiceClient = new TransactionClient();
|
|
|
452 |
order = transactionServiceClient.getClient().getOrder(orderId);
|
|
|
453 |
long source = order.getTransactionId();
|
|
|
454 |
HelperClient helperClient = new HelperClient("helper_service_server","helper_service_server_port");
|
|
|
455 |
String mail = helperClient.getClient().getOrderConfirmationMail(source);
|
|
|
456 |
File file = new File("/tmp/temp");
|
| 7643 |
manish.sha |
457 |
//Start:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
|
|
|
458 |
if(mail.isEmpty() || mail==null || mail=="")
|
|
|
459 |
mail="<html><body><p>Sorry, Required e-mail for mentioned order does not exist in the system !!!</p></body></html>";
|
|
|
460 |
//End:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
|
| 7221 |
kshitij.so |
461 |
|
| 7372 |
kshitij.so |
462 |
FileWriter writer = new FileWriter(file);
|
|
|
463 |
writer.append(mail);
|
|
|
464 |
writer.close();
|
| 4689 |
anupam.sin |
465 |
|
| 7372 |
kshitij.so |
466 |
byte[] buffer = new byte[(int)file.length()];
|
|
|
467 |
InputStream input = null;
|
|
|
468 |
try {
|
|
|
469 |
int totalBytesRead = 0;
|
|
|
470 |
input = new BufferedInputStream(new FileInputStream(file));
|
|
|
471 |
while(totalBytesRead < buffer.length){
|
|
|
472 |
int bytesRemaining = buffer.length - totalBytesRead;
|
|
|
473 |
int bytesRead = input.read(buffer, totalBytesRead, bytesRemaining);
|
|
|
474 |
if (bytesRead > 0){
|
|
|
475 |
totalBytesRead = totalBytesRead + bytesRead;
|
|
|
476 |
}
|
|
|
477 |
}
|
|
|
478 |
}
|
|
|
479 |
finally {
|
|
|
480 |
input.close();
|
|
|
481 |
file.delete();
|
|
|
482 |
}
|
| 3578 |
mandeep.dh |
483 |
|
| 4142 |
mandeep.dh |
484 |
|
| 7372 |
kshitij.so |
485 |
response.setHeader("Content-disposition", "inline; filename=" + "OrderDetail_"+orderId );
|
| 2674 |
vikas |
486 |
|
| 7372 |
kshitij.so |
487 |
ServletOutputStream sos;
|
|
|
488 |
try {
|
|
|
489 |
sos = response.getOutputStream();
|
|
|
490 |
sos.write(buffer);
|
|
|
491 |
sos.flush();
|
|
|
492 |
} catch (IOException e) {
|
|
|
493 |
System.out.println("Unable to stream the manifest file");
|
|
|
494 |
}
|
|
|
495 |
}
|
| 4142 |
mandeep.dh |
496 |
|
| 7372 |
kshitij.so |
497 |
public void getOrderDeliveryMail() throws IOException, TException, ConfigException, TransactionServiceException {
|
|
|
498 |
HelperClient helperClient = new HelperClient("helper_service_server","helper_service_server_port");
|
|
|
499 |
String mail = helperClient.getClient().getOrderDeliveryMail(orderId);
|
|
|
500 |
File file = new File("/tmp/temp");
|
| 7643 |
manish.sha |
501 |
//Start:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
|
|
|
502 |
if(mail.isEmpty() || mail==null || mail=="")
|
|
|
503 |
mail="<html><body><p>Sorry, Required e-mail for mentioned order does not exist in the system anymore !!!</p></body></html>";
|
|
|
504 |
//End:- Added by Manish Sharma for resolving Exception for getting order delivery and confirmation mail on 27-Jun-2013
|
| 7372 |
kshitij.so |
505 |
FileWriter writer = new FileWriter(file);
|
|
|
506 |
writer.append(mail);
|
|
|
507 |
writer.close();
|
| 2674 |
vikas |
508 |
|
| 7372 |
kshitij.so |
509 |
byte[] buffer = new byte[(int)file.length()];
|
|
|
510 |
InputStream input = null;
|
|
|
511 |
try {
|
|
|
512 |
int totalBytesRead = 0;
|
|
|
513 |
input = new BufferedInputStream(new FileInputStream(file));
|
|
|
514 |
while(totalBytesRead < buffer.length){
|
|
|
515 |
int bytesRemaining = buffer.length - totalBytesRead;
|
|
|
516 |
int bytesRead = input.read(buffer, totalBytesRead, bytesRemaining);
|
|
|
517 |
if (bytesRead > 0){
|
|
|
518 |
totalBytesRead = totalBytesRead + bytesRead;
|
|
|
519 |
}
|
|
|
520 |
}
|
|
|
521 |
}
|
|
|
522 |
finally {
|
|
|
523 |
input.close();
|
|
|
524 |
file.delete();
|
|
|
525 |
}
|
| 3578 |
mandeep.dh |
526 |
|
| 5845 |
mandeep.dh |
527 |
|
| 7372 |
kshitij.so |
528 |
response.setHeader("Content-disposition", "inline; filename=" + "OrderDetail_"+orderId );
|
| 4142 |
mandeep.dh |
529 |
|
| 7372 |
kshitij.so |
530 |
ServletOutputStream sos;
|
|
|
531 |
try {
|
|
|
532 |
sos = response.getOutputStream();
|
|
|
533 |
sos.write(buffer);
|
|
|
534 |
sos.flush();
|
|
|
535 |
} catch (IOException e) {
|
|
|
536 |
System.out.println("Unable to stream the manifest file");
|
|
|
537 |
}
|
|
|
538 |
}
|
| 2674 |
vikas |
539 |
|
| 7372 |
kshitij.so |
540 |
public boolean canOrderBeCancelled() {
|
|
|
541 |
if (setOfcancellableStates.contains(order.getStatus())) {
|
|
|
542 |
return true;
|
|
|
543 |
}
|
|
|
544 |
return false;
|
|
|
545 |
}
|
| 2674 |
vikas |
546 |
|
| 7372 |
kshitij.so |
547 |
public String getPaymentGateway(Payment payment) {
|
|
|
548 |
String gatewayName = "";
|
| 2674 |
vikas |
549 |
|
| 7372 |
kshitij.so |
550 |
try {
|
|
|
551 |
Client paymentServiceClient = new PaymentClient().getClient();
|
|
|
552 |
gatewayName = paymentServiceClient.getPaymentGateway(payment.getGatewayId()).getName();
|
|
|
553 |
} catch (TTransportException e) {
|
|
|
554 |
} catch (PaymentException e) {
|
|
|
555 |
} catch (TException e) {
|
|
|
556 |
}
|
| 3090 |
mandeep.dh |
557 |
|
| 7372 |
kshitij.so |
558 |
return gatewayName;
|
|
|
559 |
}
|
| 3499 |
mandeep.dh |
560 |
|
| 7372 |
kshitij.so |
561 |
public int convertDouble(double value) {
|
|
|
562 |
return (int)value;
|
|
|
563 |
}
|
| 4142 |
mandeep.dh |
564 |
|
| 7372 |
kshitij.so |
565 |
public String getInsuranceExpiryDate(long DeliveryDate) {
|
|
|
566 |
if (DeliveryDate == 0) {
|
|
|
567 |
return "N/A";
|
|
|
568 |
}
|
|
|
569 |
Calendar cal = Calendar.getInstance();
|
|
|
570 |
cal.setTimeInMillis(DeliveryDate);
|
|
|
571 |
cal.add(Calendar.YEAR, 1);
|
|
|
572 |
SimpleDateFormat sdf = new SimpleDateFormat("dd MMM, yyyy");
|
|
|
573 |
return sdf.format(cal.getTime());
|
|
|
574 |
}
|
| 4142 |
mandeep.dh |
575 |
|
| 7372 |
kshitij.so |
576 |
public String getShippingAddressOfStore(long storeId) {
|
|
|
577 |
try {
|
|
|
578 |
in.shop2020.logistics.LogisticsService.Client client = new LogisticsClient().getClient();
|
|
|
579 |
PickupStore store = client.getPickupStore(storeId);
|
|
|
580 |
return StringUtils.join(new String[] {
|
|
|
581 |
store.getName(),
|
|
|
582 |
store.getLine1(),
|
|
|
583 |
store.getLine2(),
|
|
|
584 |
store.getPin(),
|
|
|
585 |
store.getCity(),
|
|
|
586 |
store.getState(),
|
|
|
587 |
store.getPhone()}, ",");
|
|
|
588 |
} catch (Exception e) {
|
|
|
589 |
return "";
|
|
|
590 |
}
|
|
|
591 |
}
|
| 4241 |
anupam.sin |
592 |
|
| 7372 |
kshitij.so |
593 |
public String getAddress(Order order) {
|
|
|
594 |
return ModelUtils.extractAddressFromOrder(order);
|
|
|
595 |
}
|
| 4241 |
anupam.sin |
596 |
|
| 7372 |
kshitij.so |
597 |
public String changeShippingAddress() {
|
|
|
598 |
try {
|
|
|
599 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 7942 |
manish.sha |
600 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
|
|
601 |
= transactionServiceClient.getClient();
|
|
|
602 |
transactionClient.changeShippingAddress(orderId, line1, line2, city, state, pin);
|
|
|
603 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
|
|
604 |
if(t_order.getLogistics_provider_id()==7L){
|
|
|
605 |
FedExShipAccountInfo fedexAccountInfo = FedExShipAccountInfo.getFedExInfo();
|
|
|
606 |
ProcessShipmentReply processShipmentReply = ShipWebServiceClient.getShipmentCreationReply(t_order,fedexAccountInfo.getClientDetail(),fedexAccountInfo.getWad(),fedexAccountInfo.getEndPointAddress());
|
|
|
607 |
CompletedShipmentDetail completedShipmentDetails = processShipmentReply.getCompletedShipmentDetail();
|
|
|
608 |
CompletedPackageDetail completedPackageDetails = completedShipmentDetails.getCompletedPackageDetails(0);
|
|
|
609 |
TrackingId trackId= completedPackageDetails.getTrackingIds(0);
|
|
|
610 |
t_order = transactionClient.updateOrderAWB(t_order.getId(), trackId.getTrackingNumber());
|
|
|
611 |
}
|
| 7372 |
kshitij.so |
612 |
} catch(Exception e) {
|
|
|
613 |
log.error("Unable to update address for orderId : " + orderId + "and address : " +
|
|
|
614 |
line1 + ", " + line2+ ", " + city + ", " + state + ", " + pin, e);
|
|
|
615 |
}
|
|
|
616 |
return null;
|
|
|
617 |
}
|
| 7399 |
anupam.sin |
618 |
|
| 7730 |
anupam.sin |
619 |
public String convertStoreToNormal() {
|
|
|
620 |
try{
|
|
|
621 |
TransactionClient transactionServiceClient = new TransactionClient();
|
|
|
622 |
transactionServiceClient.getClient().convertStoreToNormal(orderId);
|
|
|
623 |
} catch(Exception e) {
|
|
|
624 |
log.error("Unable to convert to normal order", e);
|
|
|
625 |
}
|
|
|
626 |
return null;
|
|
|
627 |
}
|
|
|
628 |
|
| 7399 |
anupam.sin |
629 |
public String getStoreDetails(long storeId) {
|
|
|
630 |
try {
|
|
|
631 |
TransactionClient tcl = new TransactionClient();
|
|
|
632 |
HotspotStore store = tcl.getClient().getHotspotStore(storeId, "");
|
|
|
633 |
return store.getHotspotId() + " - " + store.getCity();
|
|
|
634 |
} catch (Exception e) {
|
|
|
635 |
log.error("Unable to get hostspotStore for id : " + storeId, e);
|
|
|
636 |
}
|
|
|
637 |
return "N/A";
|
|
|
638 |
}
|
| 4689 |
anupam.sin |
639 |
|
| 7372 |
kshitij.so |
640 |
public Address getShippingAddress(Order order) {
|
|
|
641 |
Address address = new Address();
|
|
|
642 |
address.setLine1(order.getCustomer_address1());
|
|
|
643 |
address.setLine2(order.getCustomer_address2());
|
|
|
644 |
address.setCity(order.getCustomer_city());
|
|
|
645 |
address.setState(order.getCustomer_state());
|
|
|
646 |
address.setPin(order.getCustomer_pincode());
|
|
|
647 |
return address;
|
|
|
648 |
}
|
| 8606 |
amar.kumar |
649 |
|
|
|
650 |
public String getOrderSource(Order order) {
|
|
|
651 |
return OrderSource.findByValue((int)(order.getSource())).toString();
|
|
|
652 |
}
|
| 4689 |
anupam.sin |
653 |
|
| 7372 |
kshitij.so |
654 |
public String getPaymentMethod(List<Attribute> paymentAttributes) {
|
|
|
655 |
String paymentMethod = null;
|
|
|
656 |
if (paymentAttributes == null || paymentAttributes.isEmpty()) {
|
|
|
657 |
return "N/A";
|
|
|
658 |
}
|
|
|
659 |
for (Attribute a : paymentAttributes) {
|
|
|
660 |
if ("payMethod".equals(a.getName())) {
|
|
|
661 |
paymentMethod = Constants.PAYMENT_METHOD.get(a.getValue());
|
|
|
662 |
break;
|
|
|
663 |
}
|
|
|
664 |
}
|
|
|
665 |
return paymentMethod != null ? paymentMethod : "N/A";
|
|
|
666 |
}
|
| 8824 |
manish.sha |
667 |
//Start:- Added by Manish Sharma for Physical Refunds
|
|
|
668 |
public String refundOrderPayment(){
|
|
|
669 |
try{
|
|
|
670 |
TransactionClient transactionServiceClient = new TransactionClient();
|
|
|
671 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
|
|
672 |
= transactionServiceClient.getClient();
|
|
|
673 |
|
|
|
674 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
|
|
675 |
List<in.shop2020.model.v1.order.Attribute> attrList = new ArrayList<in.shop2020.model.v1.order.Attribute>();
|
|
|
676 |
in.shop2020.model.v1.order.Attribute attr1 = new in.shop2020.model.v1.order.Attribute();
|
|
|
677 |
attr1.setName("Refund_Option");
|
|
|
678 |
in.shop2020.model.v1.order.Attribute attr2 = new in.shop2020.model.v1.order.Attribute();
|
|
|
679 |
attr2.setName("Refund_Amount");
|
| 8860 |
manish.sha |
680 |
in.shop2020.model.v1.order.Attribute attr3 = new in.shop2020.model.v1.order.Attribute();
|
| 8893 |
manish.sha |
681 |
attr3.setName("Refund_TimeStamp");
|
| 8866 |
manish.sha |
682 |
SimpleDateFormat timestmapFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
|
| 8824 |
manish.sha |
683 |
PaymentClient paymentServiceClient = new PaymentClient();
|
|
|
684 |
List<Payment> orderPayments =null;
|
|
|
685 |
if(!t_order.isCod()){
|
|
|
686 |
orderPayments =paymentServiceClient.getClient()
|
|
|
687 |
.getPaymentForTxnId(t_order.getTransactionId());
|
|
|
688 |
}
|
|
|
689 |
|
|
|
690 |
if(rfdRadio.equalsIgnoreCase("rfdCoupon")){
|
|
|
691 |
if((couponDetails!=null && !("").equalsIgnoreCase(couponDetails)) || (refundAmountCoupon!=null &&!("").equalsIgnoreCase(refundAmountCoupon))){
|
|
|
692 |
if(Double.parseDouble(refundAmountCoupon) <= t_order.getTotal_amount()){
|
|
|
693 |
log.info(Double.parseDouble(refundAmountCoupon));
|
|
|
694 |
log.info(t_order.getTotal_amount());
|
|
|
695 |
attr1.setValue("Refund By Coupon: "+couponDetails);
|
|
|
696 |
attrList.add(attr1);
|
|
|
697 |
attr2.setValue(refundAmountCoupon);
|
|
|
698 |
attrList.add(attr2);
|
| 8860 |
manish.sha |
699 |
attr3.setValue(timestmapFormat.format(Calendar.getInstance().getTime()));
|
|
|
700 |
attrList.add(attr3);
|
| 8824 |
manish.sha |
701 |
transactionClient.setOrderAttributes(t_order.getId(), attrList);
|
|
|
702 |
successmsg = "Refund Marked Successful: Through Coupon";
|
|
|
703 |
return "physical-refund-result";
|
|
|
704 |
}
|
| 8896 |
manish.sha |
705 |
else if(orderPayments !=null && !orderPayments.isEmpty()){
|
|
|
706 |
Payment payment = orderPayments.get(0);
|
|
|
707 |
if(Double.parseDouble(refundAmountCoupon) <= payment.getAmount()){
|
|
|
708 |
log.info(Double.parseDouble(refundAmountCoupon));
|
|
|
709 |
log.info(payment.getAmount());
|
|
|
710 |
attr1.setValue("Refund By Coupon: "+couponDetails);
|
|
|
711 |
attrList.add(attr1);
|
|
|
712 |
attr2.setValue(refundAmountCoupon);
|
|
|
713 |
attrList.add(attr2);
|
|
|
714 |
attr3.setValue(timestmapFormat.format(Calendar.getInstance().getTime()));
|
|
|
715 |
attrList.add(attr3);
|
|
|
716 |
transactionClient.setOrderAttributes(t_order.getId(), attrList);
|
|
|
717 |
successmsg = "Refund Marked Successful: Through Coupon";
|
|
|
718 |
return "physical-refund-result";
|
|
|
719 |
}
|
|
|
720 |
else{
|
|
|
721 |
errorMsg ="Refund Unsuccessful: Due to coupon amount greater than Payment Gateway Amount ";
|
|
|
722 |
return "physical-refund-result";
|
|
|
723 |
}
|
|
|
724 |
}
|
|
|
725 |
errorMsg ="Refund Unsuccessful: Due to coupon amount greater than Order Total Amount ";
|
| 8824 |
manish.sha |
726 |
}
|
|
|
727 |
else{
|
|
|
728 |
errorMsg ="Refund Unsuccessful: Due to either coupon details or refund amount is blank ";
|
|
|
729 |
return "physical-refund-result";
|
|
|
730 |
}
|
|
|
731 |
errorMsg ="Refund Unsuccessful: Due to coupon amount greater than order total amount ";
|
|
|
732 |
}
|
|
|
733 |
if(rfdRadio.equalsIgnoreCase("rfdCheque")){
|
|
|
734 |
if((chequeDetails!=null && !("").equalsIgnoreCase(chequeDetails)) || (refundAmountCheque!=null &&!("").equalsIgnoreCase(refundAmountCheque))){
|
|
|
735 |
if(Double.parseDouble(refundAmountCheque) <= t_order.getTotal_amount()){
|
|
|
736 |
attr1.setValue("Refund By Cheque: "+chequeDetails);
|
|
|
737 |
attrList.add(attr1);
|
|
|
738 |
attr2.setValue(refundAmountCheque);
|
|
|
739 |
attrList.add(attr2);
|
| 8860 |
manish.sha |
740 |
attr3.setValue(timestmapFormat.format(Calendar.getInstance().getTime()));
|
|
|
741 |
attrList.add(attr3);
|
| 8824 |
manish.sha |
742 |
transactionClient.setOrderAttributes(t_order.getId(), attrList);
|
|
|
743 |
successmsg = "Refund Marked Successful: Through Cheque";
|
|
|
744 |
return "physical-refund-result";
|
|
|
745 |
}
|
|
|
746 |
}
|
|
|
747 |
else{
|
|
|
748 |
errorMsg ="Refund Unsuccessful: Due to either cheque details or refund amount is blank ";
|
|
|
749 |
return "physical-refund-result";
|
|
|
750 |
}
|
|
|
751 |
errorMsg ="Refund Unsuccessful: Due to cheque amount greater than order total amount ";
|
|
|
752 |
}
|
|
|
753 |
if(rfdRadio.equalsIgnoreCase("rfdGateway")){
|
| 8896 |
manish.sha |
754 |
if((comments!=null && !("").equalsIgnoreCase(comments))
|
|
|
755 |
|| (refundAmountGateway!=null &&!("").equalsIgnoreCase(refundAmountGateway))){
|
|
|
756 |
if(orderPayments !=null && !orderPayments.isEmpty()){
|
|
|
757 |
Payment payment = orderPayments.get(0);
|
|
|
758 |
if(Double.parseDouble(refundAmountGateway) <= payment.getAmount()){
|
|
|
759 |
boolean refundResult = paymentServiceClient.getClient().refundPayment(t_order.getTransactionId(), Double.parseDouble(refundAmountGateway), false);
|
|
|
760 |
if(refundResult){
|
|
|
761 |
attr1.setValue("Refund By Payment Gatway: "+comments);
|
|
|
762 |
attrList.add(attr1);
|
|
|
763 |
attr2.setValue(refundAmountGateway);
|
|
|
764 |
attrList.add(attr2);
|
|
|
765 |
attr3.setValue(timestmapFormat.format(Calendar.getInstance().getTime()));
|
|
|
766 |
attrList.add(attr3);
|
|
|
767 |
transactionClient.setOrderAttributes(t_order.getId(), attrList);
|
|
|
768 |
successmsg = "Refund Marked Successful: Through Gateway";
|
|
|
769 |
return "physical-refund-result";
|
|
|
770 |
}
|
|
|
771 |
else{
|
| 8824 |
manish.sha |
772 |
if(payment.getGatewayId()==13L){
|
|
|
773 |
attr1.setValue("Refund By Innoviti Gatway: "+comments);
|
|
|
774 |
attrList.add(attr1);
|
|
|
775 |
attr2.setValue(refundAmountGateway);
|
|
|
776 |
attrList.add(attr2);
|
| 8860 |
manish.sha |
777 |
attr3.setValue(timestmapFormat.format(Calendar.getInstance().getTime()));
|
|
|
778 |
attrList.add(attr3);
|
| 8824 |
manish.sha |
779 |
transactionClient.setOrderAttributes(t_order.getId(), attrList);
|
|
|
780 |
successmsg = "Refund Marked Successful: Through Innoviti Payment Gateway.";
|
|
|
781 |
return "physical-refund-result";
|
|
|
782 |
}
|
| 8896 |
manish.sha |
783 |
errorMsg ="Refund Unsuccessful: at Payment Gateway ";
|
|
|
784 |
return "physical-refund-result";
|
| 8824 |
manish.sha |
785 |
}
|
| 8896 |
manish.sha |
786 |
}
|
|
|
787 |
else{
|
|
|
788 |
errorMsg ="Refund Unsuccessful: Due to refund Amount is greater than Payment Gateway Amount ";
|
| 8824 |
manish.sha |
789 |
return "physical-refund-result";
|
|
|
790 |
}
|
|
|
791 |
}
|
| 8896 |
manish.sha |
792 |
errorMsg ="Refund Unsuccessful: There is no Payment to be refunded ";
|
| 8824 |
manish.sha |
793 |
}
|
|
|
794 |
else{
|
|
|
795 |
errorMsg ="Refund Unsuccessful: Due to either comments or refund amount is blank ";
|
|
|
796 |
return "physical-refund-result";
|
|
|
797 |
}
|
| 8896 |
manish.sha |
798 |
|
| 8824 |
manish.sha |
799 |
}
|
|
|
800 |
|
|
|
801 |
}
|
|
|
802 |
catch(Exception e){
|
|
|
803 |
log.error(e);
|
|
|
804 |
}
|
|
|
805 |
return "physical-refund-result";
|
|
|
806 |
}
|
| 8862 |
manish.sha |
807 |
|
| 8824 |
manish.sha |
808 |
public int getRefundEnabledStatus(){
|
|
|
809 |
try{
|
|
|
810 |
TransactionClient transactionServiceClient = new TransactionClient();
|
|
|
811 |
in.shop2020.model.v1.order.TransactionService.Client transactionClient
|
|
|
812 |
= transactionServiceClient.getClient();
|
|
|
813 |
in.shop2020.model.v1.order.Order t_order = transactionClient.getOrder(orderId);
|
| 8872 |
manish.sha |
814 |
if(OrderSource.WEBSITE.getValue()!=t_order.getSource()){
|
| 8871 |
manish.sha |
815 |
return 1;
|
|
|
816 |
}
|
| 8824 |
manish.sha |
817 |
String refundOption=transactionClient.getOrderAttributeValue(orderId, "Refund_Option");
|
|
|
818 |
String refundAmount=transactionClient.getOrderAttributeValue(orderId, "Refund_Amount");
|
| 8860 |
manish.sha |
819 |
String refundTimeStamp = transactionClient.getOrderAttributeValue(orderId, "Refund_TimeStamp");
|
|
|
820 |
List<String> details = new ArrayList<String>();
|
|
|
821 |
if(refundOption!=null && !("").equalsIgnoreCase(refundOption)){
|
|
|
822 |
details.add("Refund Option:- "+refundOption);
|
|
|
823 |
}
|
|
|
824 |
|
|
|
825 |
if(refundAmount!=null && !("").equalsIgnoreCase(refundAmount)){
|
|
|
826 |
details.add("Refund Amount:- "+refundAmount);
|
|
|
827 |
}
|
|
|
828 |
|
|
|
829 |
if(refundTimeStamp!=null && !("").equalsIgnoreCase(refundTimeStamp)){
|
|
|
830 |
details.add("Refund TimeStamp:- "+refundTimeStamp);
|
|
|
831 |
}
|
|
|
832 |
setPhysicalRefundDetails(details);
|
|
|
833 |
|
| 8864 |
manish.sha |
834 |
if((refundOption!=null && refundAmount!=null) && (!("").equalsIgnoreCase(refundOption)) && !("").equalsIgnoreCase(refundAmount)){
|
| 8824 |
manish.sha |
835 |
System.out.println("Into the Refund Condition");
|
|
|
836 |
return 0;
|
|
|
837 |
}
|
| 8871 |
manish.sha |
838 |
|
| 8848 |
manish.sha |
839 |
else if(t_order.isCod()){
|
|
|
840 |
if(setOfrefundableStates.contains(t_order.getStatus()) && SecurityUtils.getSubject().hasRole("TeamLead")){
|
|
|
841 |
System.out.println("Into the COD Status Condition");
|
|
|
842 |
return 2;
|
|
|
843 |
}
|
| 8824 |
manish.sha |
844 |
}
|
| 8848 |
manish.sha |
845 |
else{
|
| 8929 |
manish.sha |
846 |
if(( setOfprepaidrefundableStates.contains(t_order.getStatus()) || setOfrefundableStates.contains(t_order.getStatus()) ) && SecurityUtils.getSubject().hasRole("TeamLead") && (t_order.isSetAccepted_timestamp() || t_order.isSetOriginalOrderId())){
|
| 8848 |
manish.sha |
847 |
System.out.println("Into the Prepaid Status Condition");
|
|
|
848 |
return 2;
|
|
|
849 |
}
|
|
|
850 |
}
|
| 8824 |
manish.sha |
851 |
}
|
|
|
852 |
catch(Exception e){
|
|
|
853 |
log.error(e);
|
|
|
854 |
}
|
|
|
855 |
return 1;
|
|
|
856 |
}
|
| 8860 |
manish.sha |
857 |
|
|
|
858 |
public void setPhysicalRefundDetails(List<String> details){
|
|
|
859 |
this.refundDetails = details;
|
|
|
860 |
}
|
|
|
861 |
|
|
|
862 |
public List<String> getPhysicalRefundDetails(){
|
|
|
863 |
return this.refundDetails;
|
|
|
864 |
}
|
| 8824 |
manish.sha |
865 |
//End:- Added by Manish Sharma for Physical Refunds
|
| 4689 |
anupam.sin |
866 |
|
| 7372 |
kshitij.so |
867 |
public void setOrderId(String orderId) {
|
|
|
868 |
try {
|
|
|
869 |
this.orderId = Long.parseLong(orderId);
|
|
|
870 |
} catch (NumberFormatException e) {
|
|
|
871 |
log.error(e);
|
|
|
872 |
}
|
|
|
873 |
}
|
| 4689 |
anupam.sin |
874 |
|
| 7372 |
kshitij.so |
875 |
public List<Payment> getPayments() {
|
|
|
876 |
return payments;
|
|
|
877 |
}
|
| 4689 |
anupam.sin |
878 |
|
| 7372 |
kshitij.so |
879 |
public List<ShipmentUpdate> getShipmentUpdates() {
|
|
|
880 |
return shipmentUpdates;
|
|
|
881 |
}
|
| 4689 |
anupam.sin |
882 |
|
| 7372 |
kshitij.so |
883 |
public void setShipmentUpdates(List<ShipmentUpdate> shipmentUpdates) {
|
|
|
884 |
this.shipmentUpdates = shipmentUpdates;
|
|
|
885 |
}
|
| 6985 |
anupam.sin |
886 |
|
| 7372 |
kshitij.so |
887 |
public Order getOrder() {
|
|
|
888 |
return order;
|
|
|
889 |
}
|
| 6985 |
anupam.sin |
890 |
|
| 7372 |
kshitij.so |
891 |
public void setOrder(Order order) {
|
|
|
892 |
this.order = order;
|
|
|
893 |
}
|
| 6985 |
anupam.sin |
894 |
|
| 7372 |
kshitij.so |
895 |
public Long getCodTicketId() {
|
|
|
896 |
return codTicketId;
|
|
|
897 |
}
|
| 6985 |
anupam.sin |
898 |
|
| 7372 |
kshitij.so |
899 |
public void setCodTicketId(Long codTicketId) {
|
|
|
900 |
this.codTicketId = codTicketId;
|
|
|
901 |
}
|
| 6985 |
anupam.sin |
902 |
|
| 7372 |
kshitij.so |
903 |
public List<Address> getAddresses() {
|
|
|
904 |
return addresses;
|
|
|
905 |
}
|
| 6985 |
anupam.sin |
906 |
|
| 7372 |
kshitij.so |
907 |
public void setAddresses(List<Address> addresses) {
|
|
|
908 |
this.addresses = addresses;
|
|
|
909 |
}
|
| 6985 |
anupam.sin |
910 |
|
| 7372 |
kshitij.so |
911 |
public String getOrderStatusDescription(Order order) {
|
|
|
912 |
String status = order.getStatus().getDescription();
|
| 6985 |
anupam.sin |
913 |
|
| 7372 |
kshitij.so |
914 |
if (order.getStatus() == OrderStatus.DELIVERY_SUCCESS) {
|
|
|
915 |
status = "Completed";
|
|
|
916 |
}
|
| 6985 |
anupam.sin |
917 |
|
| 7372 |
kshitij.so |
918 |
return status;
|
|
|
919 |
}
|
| 6985 |
anupam.sin |
920 |
|
| 7372 |
kshitij.so |
921 |
public String getCancellationInitiator() {
|
|
|
922 |
return cancellationInitiator;
|
|
|
923 |
}
|
| 7190 |
amar.kumar |
924 |
|
| 7372 |
kshitij.so |
925 |
public void setCancellationInitiator(String cancellationInitiator) {
|
|
|
926 |
this.cancellationInitiator = cancellationInitiator;
|
|
|
927 |
}
|
|
|
928 |
|
|
|
929 |
public String getCancelReason() {
|
|
|
930 |
return cancelReason;
|
|
|
931 |
}
|
|
|
932 |
|
|
|
933 |
public void setCancelReason(String cancelReason) {
|
|
|
934 |
this.cancelReason = cancelReason;
|
|
|
935 |
}
|
|
|
936 |
|
|
|
937 |
public String getBody() {
|
|
|
938 |
return body;
|
|
|
939 |
}
|
|
|
940 |
|
|
|
941 |
public void setBody(String body) {
|
|
|
942 |
this.body = body;
|
|
|
943 |
}
|
|
|
944 |
|
|
|
945 |
public String getLine1() {
|
|
|
946 |
return line1;
|
|
|
947 |
}
|
|
|
948 |
|
|
|
949 |
public void setLine1(String line1) {
|
|
|
950 |
this.line1 = line1;
|
|
|
951 |
}
|
|
|
952 |
|
|
|
953 |
public String getLine2() {
|
|
|
954 |
return line2;
|
|
|
955 |
}
|
|
|
956 |
|
|
|
957 |
public void setLine2(String line2) {
|
|
|
958 |
this.line2 = line2;
|
|
|
959 |
}
|
|
|
960 |
|
|
|
961 |
public String getCity() {
|
|
|
962 |
return city;
|
|
|
963 |
}
|
|
|
964 |
|
|
|
965 |
public void setCity(String city) {
|
|
|
966 |
this.city = city;
|
|
|
967 |
}
|
|
|
968 |
|
|
|
969 |
public String getState() {
|
|
|
970 |
return state;
|
|
|
971 |
}
|
|
|
972 |
|
|
|
973 |
public void setState(String state) {
|
|
|
974 |
this.state = state;
|
|
|
975 |
}
|
|
|
976 |
|
|
|
977 |
public String getPin() {
|
|
|
978 |
return pin;
|
|
|
979 |
}
|
|
|
980 |
|
|
|
981 |
public void setPin(String pin) {
|
|
|
982 |
this.pin = pin;
|
|
|
983 |
}
|
|
|
984 |
|
| 7190 |
amar.kumar |
985 |
public String getFreebieItem() {
|
|
|
986 |
return freebieItem;
|
|
|
987 |
}
|
|
|
988 |
|
|
|
989 |
public void setFreebieItem(String freebieItem) {
|
|
|
990 |
this.freebieItem = freebieItem;
|
|
|
991 |
}
|
|
|
992 |
|
|
|
993 |
public String getDealText() {
|
|
|
994 |
return dealText;
|
|
|
995 |
}
|
|
|
996 |
|
|
|
997 |
public void setDealText(String dealText) {
|
|
|
998 |
this.dealText = dealText;
|
|
|
999 |
}
|
|
|
1000 |
|
|
|
1001 |
public String getParentOrderIdForFreebieOrder() {
|
|
|
1002 |
return parentOrderIdForFreebieOrder;
|
|
|
1003 |
}
|
|
|
1004 |
|
|
|
1005 |
public void setParentOrderIdForFreebieOrder(String parentOrderIdForFreebieOrder) {
|
|
|
1006 |
this.parentOrderIdForFreebieOrder = parentOrderIdForFreebieOrder;
|
|
|
1007 |
}
|
|
|
1008 |
|
|
|
1009 |
public String getFreebieOrderId() {
|
|
|
1010 |
return freebieOrderId;
|
|
|
1011 |
}
|
|
|
1012 |
|
|
|
1013 |
public void setFreebieOrderId(String freebieOrderId) {
|
|
|
1014 |
this.freebieOrderId = freebieOrderId;
|
|
|
1015 |
}
|
| 7372 |
kshitij.so |
1016 |
|
| 7393 |
anupam.sin |
1017 |
public void setCashAmount(double cashAmount) {
|
|
|
1018 |
this.cashAmount = cashAmount;
|
|
|
1019 |
}
|
|
|
1020 |
|
|
|
1021 |
public double getCashAmount() {
|
|
|
1022 |
return cashAmount;
|
|
|
1023 |
}
|
|
|
1024 |
|
|
|
1025 |
public void setCardAmount(double cardAmount) {
|
|
|
1026 |
this.cardAmount = cardAmount;
|
|
|
1027 |
}
|
|
|
1028 |
|
|
|
1029 |
public double getCardAmount() {
|
|
|
1030 |
return cardAmount;
|
|
|
1031 |
}
|
|
|
1032 |
|
|
|
1033 |
public long getOrderId() {
|
|
|
1034 |
return orderId;
|
|
|
1035 |
}
|
|
|
1036 |
|
|
|
1037 |
public void setOrderId(long orderId) {
|
|
|
1038 |
this.orderId = orderId;
|
|
|
1039 |
}
|
|
|
1040 |
|
|
|
1041 |
public StoreOrderDetail getStoreOrderDetail() {
|
|
|
1042 |
return storeOrderDetail;
|
|
|
1043 |
}
|
|
|
1044 |
|
|
|
1045 |
public void setStoreOrderDetail(StoreOrderDetail storeOrderDetail) {
|
|
|
1046 |
this.storeOrderDetail = storeOrderDetail;
|
|
|
1047 |
}
|
| 7826 |
manish.sha |
1048 |
|
|
|
1049 |
//Start:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
|
|
1050 |
public AmazonOrder getAmazonOrder() {
|
|
|
1051 |
return amazonOrder;
|
|
|
1052 |
}
|
| 7393 |
anupam.sin |
1053 |
|
| 7826 |
manish.sha |
1054 |
public void setAmazonOrder(AmazonOrder amazonOrder) {
|
|
|
1055 |
this.amazonOrder = amazonOrder;
|
|
|
1056 |
}
|
|
|
1057 |
|
|
|
1058 |
//End:- Added by Manish Sharma for Displaying Logistics Provider Id and Amazon Order Id on 25-Jul-2013
|
|
|
1059 |
|
| 7836 |
anupam.sin |
1060 |
public void setProviderName(String providerName) {
|
|
|
1061 |
this.providerName = providerName;
|
|
|
1062 |
}
|
|
|
1063 |
|
|
|
1064 |
public String getProviderName() {
|
|
|
1065 |
return providerName;
|
|
|
1066 |
}
|
|
|
1067 |
|
|
|
1068 |
public static void main(String[] args) {
|
| 8824 |
manish.sha |
1069 |
|
| 7836 |
anupam.sin |
1070 |
}
|
|
|
1071 |
|
| 8296 |
kshitij.so |
1072 |
public void setGvAmount(long gvAmount) {
|
|
|
1073 |
this.gvAmount = gvAmount;
|
|
|
1074 |
}
|
|
|
1075 |
|
|
|
1076 |
public long getGvAmount() {
|
|
|
1077 |
return gvAmount;
|
|
|
1078 |
}
|
| 8824 |
manish.sha |
1079 |
//Start:- Added by Manish Sharma for Physical Refunds
|
|
|
1080 |
public String getRfdRadio() {
|
|
|
1081 |
return rfdRadio;
|
|
|
1082 |
}
|
| 8296 |
kshitij.so |
1083 |
|
| 8824 |
manish.sha |
1084 |
|
|
|
1085 |
public void setRfdRadio(String rfdRadio) {
|
|
|
1086 |
this.rfdRadio = rfdRadio;
|
|
|
1087 |
}
|
|
|
1088 |
|
|
|
1089 |
|
|
|
1090 |
public String getCouponDetails() {
|
|
|
1091 |
return couponDetails;
|
|
|
1092 |
}
|
|
|
1093 |
|
|
|
1094 |
|
|
|
1095 |
public void setCouponDetails(String couponDetails) {
|
|
|
1096 |
this.couponDetails = couponDetails;
|
|
|
1097 |
}
|
|
|
1098 |
|
|
|
1099 |
|
|
|
1100 |
public String getRefundAmountCoupon() {
|
|
|
1101 |
return refundAmountCoupon;
|
|
|
1102 |
}
|
|
|
1103 |
|
|
|
1104 |
|
|
|
1105 |
public void setRefundAmountCoupon(String refundAmountCoupon) {
|
|
|
1106 |
this.refundAmountCoupon = refundAmountCoupon;
|
|
|
1107 |
}
|
|
|
1108 |
|
|
|
1109 |
|
|
|
1110 |
public String getChequeDetails() {
|
|
|
1111 |
return chequeDetails;
|
|
|
1112 |
}
|
|
|
1113 |
|
|
|
1114 |
|
|
|
1115 |
public void setChequeDetails(String chequeDetails) {
|
|
|
1116 |
this.chequeDetails = chequeDetails;
|
|
|
1117 |
}
|
|
|
1118 |
|
|
|
1119 |
|
|
|
1120 |
public String getRefundAmountCheque() {
|
|
|
1121 |
return refundAmountCheque;
|
|
|
1122 |
}
|
|
|
1123 |
|
|
|
1124 |
|
|
|
1125 |
public void setRefundAmountCheque(String refundAmountCheque) {
|
|
|
1126 |
this.refundAmountCheque = refundAmountCheque;
|
|
|
1127 |
}
|
|
|
1128 |
|
|
|
1129 |
|
|
|
1130 |
public String getRefundAmountGateway() {
|
|
|
1131 |
return refundAmountGateway;
|
|
|
1132 |
}
|
|
|
1133 |
|
|
|
1134 |
|
|
|
1135 |
public void setRefundAmountGateway(String refundAmountGateway) {
|
|
|
1136 |
this.refundAmountGateway = refundAmountGateway;
|
|
|
1137 |
}
|
|
|
1138 |
|
|
|
1139 |
|
|
|
1140 |
public String getComments() {
|
|
|
1141 |
return comments;
|
|
|
1142 |
}
|
|
|
1143 |
|
|
|
1144 |
|
|
|
1145 |
public void setComments(String comments) {
|
|
|
1146 |
this.comments = comments;
|
|
|
1147 |
}
|
|
|
1148 |
|
|
|
1149 |
public String getErrorMsg(){
|
|
|
1150 |
return this.errorMsg;
|
|
|
1151 |
}
|
|
|
1152 |
|
|
|
1153 |
public String getSuccessMessage(){
|
|
|
1154 |
return this.successmsg ;
|
|
|
1155 |
}
|
|
|
1156 |
//End:- Added by Manish Sharma for Physical Refunds
|
| 2674 |
vikas |
1157 |
}
|