Skip to content

Commit b3a855b

Browse files
authored
Merge pull request #179 from lilithmm/patch-1
Added Transaction Hash Upgrade note; minor edits.
2 parents 248e216 + effc8ad commit b3a855b

1 file changed

Lines changed: 38 additions & 41 deletions

File tree

README.md

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ AIM, ARB, CIM, Reporting and SIM have all been deprecated in favor of sdk-ruby/l
1818
* An Authorize.Net account (see _Registration & Configuration_ section below)
1919

2020
### Migrating from older versions
21-
Since August 2018, the Authorize.Net API has been reorganized to be more merchant focused. AuthorizeNetAIM, AuthorizeNetARB, AuthorizeNetCIM, Reporting and AuthorizeNetSIM classes have all been deprecated in favor of AuthorizeNet::API. To see the full list of mapping of new features corresponding to the deprecated features, you can see [MIGRATING.md](MIGRATING.md).
21+
Since August 2018, the Authorize.Net API has been reorganized to be more merchant focused. AuthorizeNetAIM, AuthorizeNetARB, AuthorizeNetCIM, Reporting and AuthorizeNetSIM classes have been deprecated in favor of AuthorizeNet::API. To see the full list of mapping of new features corresponding to the deprecated features, see [MIGRATING.md](MIGRATING.md).
2222

2323
### Contribution
24-
- If you need information or clarification about any Authorize.Net features, please create an issue for it. Also you can search in the [Authorize.Net developer community](https://community.developer.authorize.net/).
25-
- Before creating pull requests, please read [the contributors guide](CONTRIBUTING.md).
24+
- If you need information or clarification about Authorize.Net features, create an issue with your question. You can also search the [Authorize.Net developer community](https://community.developer.authorize.net/) for discussions related to your question.
25+
- Before creating pull requests, read [the contributors guide](CONTRIBUTING.md).
2626

2727
### TLS 1.2
28-
The Authorize.Net APIs only support connections using the TLS 1.2 security protocol. It's important to make sure you have new enough versions of all required components to support TLS 1.2. Additionally, it's very important to keep these components up to date going forward to mitigate the risk of any security flaws that may be discovered in your system or any libraries it uses.
28+
The Authorize.Net API only support connections using the TLS 1.2 security protocol. Make sure to upgrade all required components to support TLS 1.2. Keep these components up to date to mitigate the risk of new security flaws.
2929

3030

3131
## Installation
@@ -44,61 +44,59 @@ The Authorize.Net APIs only support connections using the TLS 1.2 security proto
4444

4545

4646
## Registration & Configuration
47-
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.
48-
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/).
47+
Use of this SDK and the Authorize.Net APIs requires having an account on the Authorize.Net system. You can find these details in the Settings section.
48+
If you don't currently have a production Authorize.Net account, [sign up for a sandbox account](https://developer.authorize.net/sandbox/).
4949

5050
### Authentication
51-
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).
51+
To authenticate with the Authorize.Net API, use your account's API Login ID and Transaction Key. If you don't have these credentials, obtain them from the Merchant Interface. For production accounts, the Merchant Interface is located at (https://account.authorize.net/), and for sandbox accounts, at (https://sandbox.authorize.net).
5252

53-
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.
53+
After you have your credentials, load them into the appropriate variables in your code. The below sample code shows how to set the credentials as part of the API request.
5454

5555
#### To set your API credentials for an API request:
5656
```ruby
5757
transaction = Transaction.new('YOUR_API_LOGIN_ID', 'YOUR_TRANSACTION_KEY', :gateway => :sandbox)
5858
```
5959

60-
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.
60+
Never include your API Login ID and Transaction Key directly in a file in a publically accessible portion of your website. As a best practice, define the API Login ID and Transaction Key in a constants file, and then reference those constants in your code.
6161

6262
#### Setting OAuth credentials
63-
Access Tokens can be setup using the transaction instantiation without the constructor. For example, in the method above:
63+
Access Tokens can be set up using the transaction instantiation without the constructor. For example, in the method above:
6464
```ruby
6565
transaction = Transaction.new
6666
transaction.access_token = 'testTokenValue'
6767
transaction.options_OAuth = {:gateway => :sandbox, :verify_ssl => true}
6868
```
6969

7070
### Switching between the sandbox environment and the production environment
71-
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, replace the environment constant in the transaction instantiation. For example:
71+
Authorize.Net maintains a complete sandbox environment for testing and development purposes. The sandbox environment is an exact duplicate of our production environment, with simulated transaction authorization and settlement. By default, this SDK is configured to use the sandbox environment. To switch to the production environment, replace the environment constant in the transaction instantiation. For example:
7272
```ruby
7373
# For PRODUCTION use
7474
transaction = Transaction.new('YOUR_API_LOGIN_ID', 'YOUR_TRANSACTION_KEY', :gateway => :production)
7575
```
76-
7776
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
7877

79-
8078
## SDK Usage Examples and Sample Code
81-
To get started using this SDK, it's highly recommended to download our sample code repository:
79+
When using this SDK, downloading the Authorize.Net sample code repository is recommended.
8280
* [Authorize.Net Ruby Sample Code Repository (on GitHub)](https://github.com/AuthorizeNet/sample-code-ruby)
8381

84-
In that respository, we have comprehensive sample code for all common uses of our API:
82+
The respository contains comprehensive sample code for common uses of the Authorize.Net API.
8583

86-
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
84+
The API Reference contains details and examples of the structure and formatting of the Authorize.Net API.
8785
* [Developer Center API Reference](http://developer.authorize.net/api/reference/index.html)
8886

89-
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.
87+
Use the examples in the API Reference to determine which methods and information to include in an API request using this SDK.
9088

9189
## Create a Chase Pay Transaction
9290

9391
Use this method to authorize and capture a payment using a tokenized credit card number issued by Chase Pay. Chase Pay transactions are only available to merchants using the Paymentech processor.
9492

9593
The following information is required in the request:
96-
- The **payment token**,
97-
- The **expiration date**,
98-
- The **cryptogram** received from the token provider,
99-
- The **tokenRequestorName**,
100-
- The **tokenRequestorId**, and
101-
- The **tokenRequestorEci**.
94+
- **payment token**
95+
- **expiration date**
96+
- **cryptogram** received from the token provider
97+
- **tokenRequestorName**
98+
- **tokenRequestorId**
99+
- **tokenRequestorEci**
102100

103101
When using the SDK to submit Chase Pay transactions, consider the following points:
104102
- `tokenRequesterName` must be populated with **`”CHASE_PAY”`**
@@ -109,7 +107,7 @@ When using the SDK to submit Chase Pay transactions, consider the following poin
109107
## Building & Testing the SDK
110108

111109
### Running the SDK Tests
112-
To run the integration tests (hitting the sandbox):
110+
To run the integration tests in the sandbox:
113111
```
114112
rake spec
115113
```
@@ -118,42 +116,41 @@ To run the unit tests:
118116
rake spec:ci
119117
```
120118

121-
To get spec/reporting_spec.rb to pass, go to https://sandbox.authorize.net/ under Account tab->Transaction Details API and enable it.
122-
123-
To run rspec tests, create a spec/credentials.yml with the following keys and the values obtained as described below.
119+
To run rspec tests, create a spec/credentials.yml with the following credentials and the values obtained as described below.
124120
```ruby
125121
#obtain an API login_id and transaction_id according to instructions at https://developer.authorize.net/faqs/#gettranskey
126122
api_login_id: {login_id_value}
127123
api_transaction_key: {transaction_key_value}
128-
#obtained md5 hash value by first setting the hash value in https://sandbox.authorize.net/ under the Account tab->MD5 Hash
129-
md5_value: {md5_value}
130124
```
131125

132126
### Testing Guide
133-
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.
127+
For additional help in testing your 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.
134128

135129
## Logging Sensitive Data
136-
A new sensitive data logger has been introduced with the Authorize.Net Ruby Sdk. To use it in your code, create a file called `LogConfig.yml` and place it in the base folder of your application. The logger configuration should contain the following lines:
130+
A new sensitive data logger has been introduced with the Authorize.Net Ruby SDK. To use it in your code, create a file called `LogConfig.yml` and place it in the base folder of your application. The logger configuration should contain the following lines:
137131
```
138132
loglevel: info
139133
filepath: <file_path>
140134
maskSensitiveData: true
141135
```
142-
The logger code uses the default Ruby `Logger` library. So there is no need to install any external libraries for the purpose of logging. All the above three fields in the LogConfig.yml file are mandatory. The logging levels available are `debug, info, warn` and `error`.
136+
The logger code uses the default Ruby `Logger` library. There is no need to install external libraries for the purpose of logging. The above three fields in the LogConfig.yml file are mandatory. The logging levels available are `debug, info, warn` and `error`.
143137

144-
The value for `maskSensitiveData` can either be **true** or **false**. Setting the `maskSensitiveData` flag to **true** masks the sensitive data in the request XML body while logging to the log file. You can turn off logging by removing the configuration file from your application folder.
138+
The value for `maskSensitiveData` can either be `true` or `false`. Setting the `maskSensitiveData` flag to `true` masks the sensitive data in the request XML body while logging to the log file. You can turn off logging by removing the configuration file from your application folder.
145139

146-
The list of sensitive fields which will be masked during logging are
147-
* Card Number,
148-
* Card Code,
149-
* Expiration Date,
150-
* Name on Account,
151-
* Transaction Key and
152-
* Account Number.
140+
The sensitive fields that are masked during logging are:
141+
* Card Number
142+
* Card Code
143+
* Expiration Date
144+
* Transaction Key
145+
* Account Number
146+
* Name on Account
153147

154148
There is also a list of regular expressions which the sensitive logger uses to mask credit card numbers while logging.
155149

156-
Further information on the sensitive data logging and regular expressions can be found at this [location](https://github.com/AuthorizeNet/sdk-ruby/blob/master/lib/authorize_net/api/SensitiveDataFilter.rb).
150+
More information on the regular espressions used during sensitive data logging [can be found here](https://github.com/AuthorizeNet/sdk-ruby/blob/master/lib/authorize_net/api/SensitiveDataFilter.rb).
151+
152+
### Transaction Hash Upgrade
153+
Authorize.Net is phasing out the MD5 based `transHash` element in favor of the SHA-512 based `transHashSHA2`. The setting in the Merchant Interface which controlled the MD5 Hash option is no longer available, and the `transHash` element will stop returning values at a later date to be determined. For information on how to use `transHashSHA2`, see the [Transaction Hash Upgrade Guide](https://developer.authorize.net/support/hash_upgrade/).
157154

158155
## License
159156
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.

0 commit comments

Comments
 (0)