Subversion Repositories SmartDukaan

Rev

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

Rev 13952 Rev 13953
Line 176... Line 176...
176
                                   }
176
                                   }
177
                         }
177
                         }
178
                    ])['result']
178
                    ])['result']
179
                    
179
                    
180
        userAmountMap = {}
180
        userAmountMap = {}
-
 
181
        print result
181
        for res in result:
182
        for res in result:
182
            userAmountMap[res['_id']] = res['amount']
183
            userAmountMap[res['_id']] = res['amount']
183
        datetimeNow = datetime.now() 
184
        datetimeNow = datetime.now() 
184
        batchId = int(time.mktime(datetimeNow.timetuple()))
185
        batchId = int(time.mktime(datetimeNow.timetuple()))
185
        if refundToWallet(batchId, userAmountMap):
186
        if refundToWallet(batchId, userAmountMap):
Line 218... Line 219...
218
    except:
219
    except:
219
        traceback.print_exc()
220
        traceback.print_exc()
220
        tprint("Could not batch refund")
221
        tprint("Could not batch refund")
221
        return False
222
        return False
222
    
223
    
223
    
-
 
224
    #return json.loads(response.read())['credited']
-
 
225
    
-
 
226
def main():
224
def main():
227
    #store = getStore(3)
225
    #store = getStore(3)
228
    #print store.getCashbackAmount('864683341', 100)
226
    #print store.getCashbackAmount('864683341', 100)
229
    #data = urllib.urlencode({'orderId':6000, 'amount':200})
227
    #data = urllib.urlencode({'orderId':6000, 'amount':200})
230
    #request = urllib2.Request(WALLET_CREDIT_URL % (483649), headers=headers)
228
    #request = urllib2.Request(WALLET_CREDIT_URL % (483649), headers=headers)