-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_pos.py
More file actions
21 lines (16 loc) · 922 Bytes
/
example_pos.py
File metadata and controls
21 lines (16 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
if __name__ == "__main__":
from src.wom_connector.pointofsale import POS
from src.wom_connector.filter import Filter
privk = open("keys/pos1.pem", "rb")
filter = Filter.create(aim='H', left_top_bound=[46.0, -17.0], right_bottom_bound=[12.0, 160.0], max_age=14)
pos = POS(domain='dev.wom.social',
pos_id='5e74205c5f21bb265a2d26d8', # POS ID
pos_privk=privk.read())
otc, password = pos.request_payment(amount=100,
pocket_ack_url='https://example.org',
filter=filter,
pos_ack_url='https://example.org',
persistent=False,
nonce=None,
password=None)
print("Otc: {otc} Password:{password}".format(otc=otc, password=password))