Subversion Repositories SmartDukaan

Rev

Rev 16626 | Rev 16928 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16626 Rev 16926
Line 172... Line 172...
172
                        usage.cashback = total_cashback
172
                        usage.cashback = total_cashback
173
                        usage.coupon = coupon_code
173
                        usage.coupon = coupon_code
174
                        usage.user_id = userId
174
                        usage.user_id = userId
175
                        usage.order_id = orderId
175
                        usage.order_id = orderId
176
                        session.commit()
176
                        session.commit()
-
 
177
                        session.close()
177
                    resp['result'] = 'ORDER_CREATED'
178
                    resp['result'] = 'ORDER_CREATED'
178
                else:
179
                else:
179
                    resp['result'] = 'ORDER_ALREADY_CREATED_IGNORED'
180
                    resp['result'] = 'ORDER_ALREADY_CREATED_IGNORED'
180
            except:
181
            except:
181
                resp['result'] = 'ORDER_NOT_CREATED'
182
                resp['result'] = 'ORDER_NOT_CREATED'
Line 201... Line 202...
201
    return tzDate
202
    return tzDate
202
 
203
 
203
def main():
204
def main():
204
    store = getStore(6)
205
    store = getStore(6)
205
    #store.scrapeStoreOrders()
206
    #store.scrapeStoreOrders()
206
    store.trackOrdersForUser(2, "https://paytm.com/shop/orderdetail/1168545614?actions=1&channel=web&version=2", readSSh("/PaytmTrack/User2/1168545614-20-08:12:43:21"))
207
    store.trackOrdersForUser(2, "https://paytm.com/shop/orderdetail/1168545614?actions=1&channel=web&version=2", readSSh("/home/amit/p.html"))
207
    #print store.getTrackingUrls(14)
208
    #print store.getTrackingUrls(14)
208
    
209
    
209
if __name__ == '__main__':
210
if __name__ == '__main__':
210
    main()
211
    main()
211
212