Skip to content

Commit 643925b

Browse files
committed
format.
1 parent b196e0e commit 643925b

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

utils/communication_apis.py

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
"""
22
Using the Africa's Talking API, send airtime to a phone number.
33
4-
You'll need to have an Africa's Talking account, request for airtime API access in their dashboard,
4+
You'll need to have an Africa's Talking account, request for airtime API access in their dashboard,
55
and get your API key and username.
66
77
This is the error you get
88
{'errorMessage': 'Airtime is not enabled for this account', 'numSent': 0,
99
'responses': [], 'totalAmount': '0', 'totalDiscount': '0'}
1010
1111
successful responses
12-
{'errorMessage': 'None', 'numSent': 1, 'responses': [{'amount': 'KES 10.0000',
13-
'discount': 'KES 0.4000', 'errorMessage': 'None', 'phoneNumber': 'xxxxxxxx2046',
14-
'requestId': 'ATQid_xxxx', 'status': 'Sent'}], 'totalAmount': 'KES 10.0000',
12+
{'errorMessage': 'None', 'numSent': 1, 'responses': [{'amount': 'KES 10.0000',
13+
'discount': 'KES 0.4000', 'errorMessage': 'None', 'phoneNumber': 'xxxxxxxx2046',
14+
'requestId': 'ATQid_xxxx', 'status': 'Sent'}], 'totalAmount': 'KES 10.0000',
1515
'totalDiscount': 'KES 0.4000'}
1616
1717
{'errorMessage': 'None', 'numSent': 1, 'responses': [{'amount': 'KES 10.0000',
18-
'discount': 'KES 0.4000', 'errorMessage': 'None', 'phoneNumber': 'xxxxxxxx2046',
19-
'requestId': 'ATQid_xxxx', 'status': 'Sent'}], 'totalAmount': 'KES 10.0000',
18+
'discount': 'KES 0.4000', 'errorMessage': 'None', 'phoneNumber': 'xxxxxxxx2046',
19+
'requestId': 'ATQid_xxxx', 'status': 'Sent'}], 'totalAmount': 'KES 10.0000',
2020
'totalDiscount': 'KES 0.4000'}
21-
22-
2321
"""
2422

2523
import os

0 commit comments

Comments
 (0)