Skip to content

Commit 0c3a2b0

Browse files
authored
Merge pull request AuthorizeNet#115 from AuthorizeNet/master
sync from master
2 parents 0b2ff89 + 4bfe927 commit 0c3a2b0

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,22 @@ Authorize.Net maintains a complete sandbox environment for testing and developme
5151

5252
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
5353

54+
### Enable Logging in the SDK
55+
Python SDK uses the logger _'authorizenet.sdk'_. By default, the logger in the SDK is not configured to write output. You can configure the logger in your code to start seeing logs from the SDK.
56+
57+
A sample logger configuration is given as below:
58+
59+
```python
60+
import logging
61+
logger = logging.getLogger('authorizenet.sdk')
62+
handler = logging.FileHandler('anetSdk.log')
63+
formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
64+
handler.setFormatter(formatter)
65+
logger.addHandler(handler)
66+
logger.setLevel(logging.DEBUG)
67+
logger.debug('Logger set up for Authorizenet Python SDK complete')
68+
```
69+
5470

5571
## SDK Usage Examples and Sample Code
5672
To get started using this SDK, it's highly recommended to download our sample code repository:

authorizenet/apicontrollersbase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ def execute(self):
124124

125125
self.beforeexecute()
126126

127-
proxyDictionary = {'http' : utility.helper.getproperty("http"),
128-
'https' : utility.helper.getproperty("https"),
127+
proxyDictionary = {'http' : utility.helper.getproperty("http_proxy"),
128+
'https' : utility.helper.getproperty("https_proxy"),
129129
'ftp' : utility.helper.getproperty("ftp")}
130130

131131
#requests is http request

authorizenet/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class constants(object):
1616
PRODUCTION = 'https://api2.authorize.net/xml/v1/request.api'
1717

1818
'''clientId'''
19-
version = '1.0.15'
19+
version = '1.1.0'
2020
clientId = 'sdk-python-' + version
2121

2222
'''xml encoding'''

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy