@@ -24,19 +24,19 @@ To install AuthorizeNet
24
24
Get a sandbox account at https://developer.authorize.net/sandbox
25
25
Set your API credentials:
26
26
27
- ```` python
27
+ ``` python
28
28
merchantAuth = apicontractsv1.merchantAuthenticationType()
29
29
merchantAuth.name = ' YOUR_API_LOGIN_ID'
30
30
merchantAuth.transactionKey = ' YOUR_TRANSACTION_KEY'
31
- ````
31
+ ```
32
32
33
33
34
34
## Usage
35
35
See our sample code repository at https://github.com/AuthorizeNet/sample-code-python
36
36
37
37
For the simplest "Hello World" example, paste this into a file called charge-credit-card.py and run:
38
38
39
- ```` python
39
+ ``` python
40
40
from authorizenet import apicontractsv1
41
41
from authorizenet.apicontrollers import *
42
42
from decimal import *
@@ -73,13 +73,13 @@ if (response.messages.resultCode=="Ok"):
73
73
else :
74
74
print " response code: %s " % response.messages.resultCode
75
75
76
- ````
76
+ ```
77
77
### Setting Production or Sandbox Environments
78
78
To set the environment use the setenvironment method on the controller before executing. E.g. for the example above:
79
- ```` python
79
+ ``` python
80
80
# Defaults to constants.SANDBOX for sandbox testing
81
81
createtransactioncontroller.setenvironment(constants.PRODUCTION )
82
- ````
82
+ ```
83
83
84
84
## Building and Testing Source Code
85
85
@@ -98,8 +98,7 @@ Run the following to get pyxb and nosetests:
98
98
Testing
99
99
--------------------------------------
100
100
- Tests available are: unit tests, mock tests, sample code
101
- - use nosetests to run all unittests
102
- `
103
- > nosetests
104
- `
101
+ - use nosetests to run all unittests
102
+
103
+ ` >nosetests `
105
104
0 commit comments