-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.py
More file actions
66 lines (49 loc) · 1.34 KB
/
Copy pathexample.py
File metadata and controls
66 lines (49 loc) · 1.34 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
from campay.sdk import Client as CamPayClient
campay = CamPayClient({
"app_username" : "",
"app_password" : "",
"environment" : "DEV" #"DEV" = demo mode, "PROD" = live mode
})
collect = campay.collect({
"amount": "5",
"currency": "XAF",
"from": "237xxxxxxxx",
"description": "some description",
"external_reference": "12345678"
})
collect = campay.initCollect({
"amount": "5",
"currency": "XAF",
"from": "237xxxxxxxx",
"description": "some description",
"external_reference": "12345678"
})
collect = campay.get_payment_link({
"amount": "5",
"currency": "XAF",
"from": "2376XXXXXXXX",
"description": "Test",
"first_name": "John",
"last_name": "Doe",
"email": "example@mail.com",
"external_reference": "",
"redirect_url": "https://example.com",
"failure_redirect_url": "https://example.com",
"payment_options":"MOMO,CARD"
})
disburse = campay.disburse({
"amount": "5",
"currency": "XAF",
"to": "237xxxxxxxx",
"description": "some description",
"external_reference": "12345678"
})
airtime = campay.transfer_airtime({
"amount": "100",
"to": "237xxxxxxxx",
"external_reference": "12345678"
})
balance = campay.get_balance()
campay_status = campay.get_transaction_status({
"reference": "bcedde9b-62a7-4421-96ac-2e6179552a1a"
})