You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-29Lines changed: 8 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@
7
7
8
8
9
9
## Requirements
10
-
11
10
* Python 2.7 or greater
12
11
* OpenSSL 1.0.2 or greater
13
12
* An Authorize.Net account (see _Registration & Configuration_ section below)
@@ -19,38 +18,30 @@ The Authorize.Net APIs only support connections using the TLS 1.2 security proto
19
18
20
19
21
20
## Installation
22
-
23
21
To install the AuthorizeNet Python SDK:
24
22
25
23
`pip install authorizenet`
26
24
27
25
28
26
## Registration & Configuration
29
-
30
27
Use of this SDK and the Authorize.Net APIs requires having an account on our system. You can find these details in the Settings section.
31
28
If you don't currently have a production Authorize.Net account and need a sandbox account for testing, you can easily sign up for one [here](https://developer.authorize.net/sandbox/).
32
29
33
-
34
30
### Authentication
35
-
36
31
To authenticate with the Authorize.Net API you will need to use your account's API Login ID and Transaction Key. If you don't have these values, you can obtain them from our Merchant Interface site. Access the Merchant Interface for production accounts at (https://account.authorize.net/) or sandbox accounts at (https://sandbox.authorize.net).
37
32
38
33
Once you have your keys simply load them into the appropriate variables in your code, as per the below sample code dealing with the authentication part of the API request.
39
34
40
-
41
35
#### To set your API credentials for an API request:
You should never include your Login ID and Transaction Key directly in a PHP file that's in a publically accessible portion of your website. A better practice would be to define these in a constants file, and then reference those constants in the appropriate place in your code.
50
-
42
+
You should never include your Login ID and Transaction Key directly in a file that's in a publically accessible portion of your website. A better practice would be to define these in a constants file, and then reference those constants in the appropriate place in your code.
51
43
52
44
### Switching between the sandbox environment and the production environment
53
-
54
45
Authorize.Net maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, use the `setenvironment` method on the controller before executing. For example:
55
46
```python
56
47
# For PRODUCTION use
@@ -72,39 +63,27 @@ Additionally, you can find details and examples of how our API is structured in
72
63
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
73
64
74
65
66
+
## Building & Testing the SDK
75
67
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
## Building and Testing Source Code
86
-
87
-
Requirements
88
-
--------------------------------------
68
+
### Requirements
89
69
- python 2.7
90
70
- pyxb 1.2.4
91
71
92
-
93
72
Run the following to get pyxb and nosetests:
94
73
- pip install pyxb
95
74
- pip install unittest2
96
75
- pip install nose
97
76
- pip install lxml
98
77
99
-
Testing
100
-
--------------------------------------
78
+
### Running the SDK Tests
101
79
- Tests available are: unit tests, mock tests, sample code
102
80
- use nosetests to run all unittests
103
81
104
82
`>nosetests`
105
83
84
+
### Testing Guide
85
+
For additional help in testing your own code, Authorize.Net maintains a [comprehensive testing guide](http://developer.authorize.net/hello_world/testing_guide/) that includes test credit card numbers to use and special triggers to generate certain responses from the sandbox environment.
106
86
107
-
## License
108
-
109
-
This repository is destributed under a proprietary license. See the provided [`LICENSE.txt`](/license.txt) file.
110
87
88
+
## License
89
+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/license.txt) file.
0 commit comments