Skip to content

Commit 93b6642

Browse files
committed
standardize readme format and info across repos
1 parent e4df2e5 commit 93b6642

File tree

1 file changed

+20
-50
lines changed

1 file changed

+20
-50
lines changed

README.md

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,32 @@
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-python/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-python/?branch=master)
66
[![PyPI](https://img.shields.io/pypi/v/authorizenet.svg)](https://badge.fury.io/py/authorizenet)
77

8-
`pip install authorizenet`
98

9+
## Requirements
1010

11-
## Prerequisites
11+
* Python 2.7 or greater
12+
* OpenSSL 1.0.2 or greater
13+
* An Authorize.Net account (see Registration & Configuration section below)
1214

13-
- Python 2.7 or greater
14-
- OpenSSL 1.0.2 or greater
1515

16-
We'll be ensuring this SDK is compatible with Python 2.7+, 3.2+ and PyPy but we're primarily testing against Python 2.7 so that's the current prerequisite.
16+
We'll be ensuring this SDK is compatible with Python 2.7+, 3.2+ and PyPy but we're primarily testing against Python 2.7.
1717

1818

1919
## Installation
20-
To install AuthorizeNet
20+
21+
To install the AuthorizeNet Python SDK:
2122

2223
`pip install authorizenet`
2324

2425

25-
## Registration & Configuration
26+
## Registration & Configuration {#Registration}
2627

28+
Use of this SDK and the Authorize.Net APIs requires having an account on our system
2729
Get a sandbox account at https://developer.authorize.net/sandbox
30+
31+
32+
### Authentication
33+
2834
Set your API credentials:
2935

3036
```python
@@ -34,56 +40,16 @@ Set your API credentials:
3440
```
3541

3642

37-
## Usage
38-
See our sample code repository at https://github.com/AuthorizeNet/sample-code-python
39-
40-
For the simplest "Hello World" example, paste this into a file called charge-credit-card.py and run:
41-
42-
```python
43-
from authorizenet import apicontractsv1
44-
from authorizenet.apicontrollers import *
45-
from decimal import *
46-
47-
merchantAuth = apicontractsv1.merchantAuthenticationType()
48-
merchantAuth.name = 'YOUR_LOGIN_ID'
49-
merchantAuth.transactionKey = 'YOUR_TRANSACTION_KEY'
50-
51-
creditCard = apicontractsv1.creditCardType()
52-
creditCard.cardNumber = "4111111111111111"
53-
creditCard.expirationDate = "2020-12"
54-
55-
payment = apicontractsv1.paymentType()
56-
payment.creditCard = creditCard
57-
58-
transactionrequest = apicontractsv1.transactionRequestType()
59-
transactionrequest.transactionType = "authCaptureTransaction"
60-
transactionrequest.amount = Decimal ('1.55')
61-
transactionrequest.payment = payment
62-
63-
64-
createtransactionrequest = apicontractsv1.createTransactionRequest()
65-
createtransactionrequest.merchantAuthentication = merchantAuth
66-
createtransactionrequest.refId = "MerchantID-0001"
67-
68-
createtransactionrequest.transactionRequest = transactionrequest
69-
createtransactioncontroller = createTransactionController(createtransactionrequest)
70-
createtransactioncontroller.execute()
71-
72-
response = createtransactioncontroller.getresponse()
73-
74-
if (response.messages.resultCode=="Ok"):
75-
print "Transaction ID : %s" % response.transactionResponse.transId
76-
else:
77-
print "response code: %s" % response.messages.resultCode
78-
79-
```
8043
### Setting Production or Sandbox Environments
8144
To set the environment use the setenvironment method on the controller before executing. E.g. for the example above:
8245
```python
8346
# Defaults to constants.SANDBOX for sandbox testing
8447
createtransactioncontroller.setenvironment(constants.PRODUCTION)
8548
```
8649

50+
## Usage
51+
See our sample code repository at https://github.com/AuthorizeNet/sample-code-python
52+
8753
## Building and Testing Source Code
8854

8955
Requirements
@@ -105,3 +71,7 @@ Testing
10571

10672
`>nosetests`
10773

74+
75+
## License
76+
77+
This repository is destributed under a proprietary license. See the provided [LICENSE.txt] file.

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