Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Preparing Data
- username = 'regalo.trust'
- timestamp = time.strftime('%Y%m%d%H%M%S')
- amount = abs(int(amount))
- withdrawcharge = 1
- reason = " "
- phone_number = int('25' + phone_number)
- epoch_time = int(time.time())
- transaction_id =int(str(epoch_time) + str(phone_number))
- partnerpassword = os.environ.get('partnerpassword', '')
- accountno = os.environ.get("account_no", '')
- password = hashlib.sha256((username+accountno+partnerpassword+timestamp).encode('utf-8')).hexdigest()
- data = {
- 'username':username,
- 'timestamp': timestamp,
- 'amount': amount,
- 'withdrawcharge': 1,
- 'reason': reason,
- 'password':password,
- 'mobilephone': phone_number,
- 'requesttransactionid': transaction_id
- }
- response=requests.post('https://www.intouchpay.co.rw/api/requestdeposit/', data=data)
- print("########## withdraw response: ",response.json())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement