| Line 106... |
Line 106... |
| 106 |
jsonObj = jsonObjArr.getJSONObject(0);
|
106 |
jsonObj = jsonObjArr.getJSONObject(0);
|
| 107 |
if(jsonObj!=null){
|
107 |
if(jsonObj!=null){
|
| 108 |
System.out.println("jsonObj..... "+ jsonObj);
|
108 |
System.out.println("jsonObj..... "+ jsonObj);
|
| 109 |
if(jsonObj.get("status")!=null){
|
109 |
if(jsonObj.get("status")!=null){
|
| 110 |
String status = jsonObj.get("status").toString();
|
110 |
String status = jsonObj.get("status").toString();
|
| - |
|
111 |
String statusLabel = jsonObj.get("statusLabel").toString();
|
| 111 |
if("on_hold".equalsIgnoreCase(status)){
|
112 |
if("on_hold".equalsIgnoreCase(status) || "On hold".equalsIgnoreCase(statusLabel)){
|
| 112 |
pendingOrderList.add(fkOrder);
|
113 |
pendingOrderList.add(fkOrder);
|
| 113 |
}
|
114 |
}
|
| 114 |
if("approved".equalsIgnoreCase(status)){
|
115 |
if("approved".equalsIgnoreCase(status) || "Approved".equalsIgnoreCase(statusLabel) || "confirmed".equalsIgnoreCase(statusLabel)){
|
| 115 |
if(tClient ==null || !tClient.isAlive()){
|
116 |
if(tClient ==null || !tClient.isAlive()){
|
| 116 |
tClient = transactionServiceClient.getClient();
|
117 |
tClient = transactionServiceClient.getClient();
|
| 117 |
}
|
118 |
}
|
| 118 |
tClient.verifyOrder(fkOrder.getOrderId());
|
119 |
tClient.verifyOrder(fkOrder.getOrderId());
|
| 119 |
tClient.acceptOrder(fkOrder.getOrderId());
|
120 |
tClient.acceptOrder(fkOrder.getOrderId());
|
| 120 |
acceptedOrderList.add(fkOrder);
|
121 |
acceptedOrderList.add(fkOrder);
|
| 121 |
}
|
122 |
}
|
| 122 |
if("cancelled".equalsIgnoreCase(status)){
|
123 |
if("cancelled".equalsIgnoreCase(status) || "Cancelled".equalsIgnoreCase(statusLabel)){
|
| 123 |
if(tClient ==null || !tClient.isAlive()){
|
124 |
if(tClient ==null || !tClient.isAlive()){
|
| 124 |
tClient = transactionServiceClient.getClient();
|
125 |
tClient = transactionServiceClient.getClient();
|
| 125 |
}
|
126 |
}
|
| 126 |
tClient.refundOrder(fkOrder.getOrderId(), "flipkart", "As per Buyer's Request");
|
127 |
tClient.refundOrder(fkOrder.getOrderId(), "flipkart", "As per Buyer's Request");
|
| 127 |
cancelledOrderList.add(fkOrder);
|
128 |
cancelledOrderList.add(fkOrder);
|