| Line 171... |
Line 171... |
| 171 |
updateMap['subOrders.$.cashBackAmount'], updateMap['subOrders.$.cashBacPercentage'] = self.getCashbackAmount(productCode, price)
|
171 |
updateMap['subOrders.$.cashBackAmount'], updateMap['subOrders.$.cashBacPercentage'] = self.getCashbackAmount(productCode, price)
|
| 172 |
self._updateOrdersPayBackStatus({'subTagId':subTagId, 'subOrders.productCode':productCode}, updateMap)
|
172 |
self._updateOrdersPayBackStatus({'subTagId':subTagId, 'subOrders.productCode':productCode}, updateMap)
|
| 173 |
|
173 |
|
| 174 |
|
174 |
|
| 175 |
def parseOrderRawHtml(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):
|
175 |
def parseOrderRawHtml(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):
|
| 176 |
response= {}
|
176 |
resp= {}
|
| 177 |
try:
|
177 |
try:
|
| 178 |
br = getBrowserObject()
|
178 |
br = getBrowserObject()
|
| 179 |
url = ORDER_TRACK_URL + re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|
179 |
url = ORDER_TRACK_URL + re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|
| 180 |
|
180 |
|
| 181 |
response = br.open(url)
|
181 |
response = br.open(url)
|
| Line 287... |
Line 287... |
| 287 |
print "Sub Order Status " + str(status)
|
287 |
print "Sub Order Status " + str(status)
|
| 288 |
|
288 |
|
| 289 |
trackingDetailsActive = orderTrackingDet.find("div",{"class":"c-tabs-content m-top active"})
|
289 |
trackingDetailsActive = orderTrackingDet.find("div",{"class":"c-tabs-content m-top active"})
|
| 290 |
print "Sub order tracking description " + trackingDetailsActive.text
|
290 |
print "Sub order tracking description " + trackingDetailsActive.text
|
| 291 |
self._saveToOrder(todict(merchantOrder))
|
291 |
self._saveToOrder(todict(merchantOrder))
|
| 292 |
response['result'] = 'ORDER_CREATED'
|
292 |
resp['result'] = 'ORDER_CREATED'
|
| 293 |
return response
|
293 |
return resp
|
| 294 |
except:
|
294 |
except:
|
| 295 |
response['result'] = 'PARSE_ERROR'
|
295 |
resp['result'] = 'PARSE_ERROR'
|
| 296 |
return response
|
296 |
return resp
|
| 297 |
|
297 |
|
| 298 |
|
298 |
|
| 299 |
def flipkartOrderTracking(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):
|
299 |
def flipkartOrderTracking(self, orderId, subTagId, userId, rawHtml, orderSuccessUrl):
|
| 300 |
br = getBrowserObject()
|
300 |
br = getBrowserObject()
|
| 301 |
url = ORDER_TRACK_URL + re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|
301 |
url = ORDER_TRACK_URL + re.findall('.*(\?.*?)$', orderSuccessUrl,re.IGNORECASE)[0]
|