-
Notifications
You must be signed in to change notification settings - Fork 0
/
easypay
executable file
·47 lines (33 loc) · 1.56 KB
/
easypay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3.6
################################################################################
# Easypay TX by ID v.0.0.2
# https://github.com/dznet
#-------------------------------------------------------------------------------
from sys import argv
from sys import exc_info
from requests import Session
from json import loads
def easypay_tx_status():
try:
if len(argv) > 1:
data = {'inputData':argv[1]}
endpoint = 'https://partners.easypay.ua/main/GetTransactionStatus'
headers = {'User-Agent':'Mozilla/5.0 (dzNET; Linux-4.18.4) +https://t.me/dznet',
'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8'}
proxy = {'https':'socks5://localhost:9050'}
session = Session()
response = session.post(endpoint, proxies=proxy, headers=headers, data=data)
tx = loads(response.content)
tx['receiptContent'] = tx['receiptContent'].replace('<b>', '').replace('</b>', '')
tx['receiptContent'] = tx['receiptContent'].replace('<br>', '\n')
return tx['receiptStatus'], tx['receiptContent']
else:
return 'Missing Transaction ID', 'Example: easy 44444444'
except:
info = exc_info()
error = '{}\n{}'.format(info[0], info[1])
return 'Error:', error
#---------------------------------------------------------------------------------
status, content = easypay_tx_status()
print('\n{0} {1} {0}\n\n{2}'.format('#' * 14, status, content))
##################################################################################