| Line 45... |
Line 45... |
| 45 |
merchantOrderId = re.findall(r'.*&oid=(.*)&?.*?', orderUrl)[0]
|
45 |
merchantOrderId = re.findall(r'.*&oid=(.*)&?.*?', orderUrl)[0]
|
| 46 |
resp["result"] = 'HTML_REQUIRED'
|
46 |
resp["result"] = 'HTML_REQUIRED'
|
| 47 |
order = Order(orderId, userId, subTagId, self.store_id, orderSuccessUrl, False)
|
47 |
order = Order(orderId, userId, subTagId, self.store_id, orderSuccessUrl, False)
|
| 48 |
order.orderSuccessUrl = ORDER_REDIRECT_URL % (merchantOrderId)
|
48 |
order.orderSuccessUrl = ORDER_REDIRECT_URL % (merchantOrderId)
|
| 49 |
order.merchantOrderId = merchantOrderId
|
49 |
order.merchantOrderId = merchantOrderId
|
| 50 |
order.requireDetails = True
|
50 |
order.requireDetail = True
|
| 51 |
self._saveToOrder(todict(order))
|
51 |
self._saveToOrder(todict(order))
|
| 52 |
resp["url"] = ORDER_REDIRECT_URL % (merchantOrderId)
|
52 |
resp["url"] = ORDER_REDIRECT_URL % (merchantOrderId)
|
| 53 |
return resp
|
53 |
return resp
|
| 54 |
except:
|
54 |
except:
|
| 55 |
resp["result"] = 'IGNORED'
|
55 |
resp["result"] = 'IGNORED'
|
| Line 208... |
Line 208... |
| 208 |
updateMap = {}
|
208 |
updateMap = {}
|
| 209 |
closedStatus = False
|
209 |
closedStatus = False
|
| 210 |
updateMap['subOrders.$.imgUrl'] = imgUrl
|
210 |
updateMap['subOrders.$.imgUrl'] = imgUrl
|
| 211 |
updateMap['subOrders.$.lastTracked'] = timestamp
|
211 |
updateMap['subOrders.$.lastTracked'] = timestamp
|
| 212 |
updateMap['subOrders.$.detailedStatus'] = orderStatus
|
212 |
updateMap['subOrders.$.detailedStatus'] = orderStatus
|
| 213 |
updateMap['subOrders.$.deliveredOn'] = deliveredOn
|
- |
|
| 214 |
cashbackStatus = subOrder.get("cashBackStatus")
|
213 |
cashbackStatus = subOrder.get("cashBackStatus")
|
| 215 |
updateMap['subOrders.$.status'] = status
|
214 |
updateMap['subOrders.$.status'] = status
|
| 216 |
|
215 |
|
| 217 |
if status==MStore.ORDER_DELIVERED:
|
216 |
if status==MStore.ORDER_DELIVERED:
|
| - |
|
217 |
updateMap['subOrders.$.deliveredOn'] = deliveredOn
|
| 218 |
closedStatus = True
|
218 |
closedStatus = True
|
| 219 |
updateMap['subOrders.$.closed'] = True
|
219 |
updateMap['subOrders.$.closed'] = True
|
| 220 |
if cashbackStatus == Store.CB_PENDING:
|
220 |
if cashbackStatus == Store.CB_PENDING:
|
| 221 |
updateMap['subOrders.$.cashbackStatus'] = Store.CB_APPROVED
|
221 |
updateMap['subOrders.$.cashbackStatus'] = Store.CB_APPROVED
|
| 222 |
if status==MStore.ORDER_CANCELLED:
|
222 |
if status==MStore.ORDER_CANCELLED:
|