| Line 96... |
Line 96... |
| 96 |
merchantOrderId = str(ordermap.get("id"))
|
96 |
merchantOrderId = str(ordermap.get("id"))
|
| 97 |
filename = directory + "/" + merchantOrderId + "-" + datetime.strftime(datetime.now(), '%d-%m:%H:%M:%S')
|
97 |
filename = directory + "/" + merchantOrderId + "-" + datetime.strftime(datetime.now(), '%d-%m:%H:%M:%S')
|
| 98 |
f = open(filename,'w')
|
98 |
f = open(filename,'w')
|
| 99 |
f.write(rawHtml) # python will convert \n to os.linesep
|
99 |
f.write(rawHtml) # python will convert \n to os.linesep
|
| 100 |
f.close() # you can omit in most cases as the destructor will call if
|
100 |
f.close() # you can omit in most cases as the destructor will call if
|
| 101 |
merchantOrder = self.db.merchantOrder.findOne({"merchantOrderId":merchantOrderId})
|
101 |
merchantOrder = self.db.merchantOrder.find_one({"merchantOrderId":merchantOrderId})
|
| 102 |
try:
|
102 |
try:
|
| 103 |
bulk = self.db.merchantOrder.initialize_ordered_bulk_op()
|
103 |
bulk = self.db.merchantOrder.initialize_ordered_bulk_op()
|
| 104 |
closed=True
|
104 |
closed=True
|
| 105 |
for item in ordermap.get("items"):
|
105 |
for item in ordermap.get("items"):
|
| 106 |
merchantSubOrderId = str(item.get("id"))
|
106 |
merchantSubOrderId = str(item.get("id"))
|