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
+38-41Lines changed: 38 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,14 +18,14 @@ AIM, ARB, CIM, Reporting and SIM have all been deprecated in favor of sdk-ruby/l
18
18
* An Authorize.Net account (see _Registration & Configuration_ section below)
19
19
20
20
### 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).
22
22
23
23
### 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).
26
26
27
27
### 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.
29
29
30
30
31
31
## Installation
@@ -44,61 +44,59 @@ The Authorize.Net APIs only support connections using the TLS 1.2 security proto
44
44
45
45
46
46
## 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/).
49
49
50
50
### 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).
52
52
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.
54
54
55
55
#### To set your API credentials for an API request:
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.
61
61
62
62
#### 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:
### 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:
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
78
77
79
-
80
78
## 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.
82
80
*[Authorize.Net Ruby Sample Code Repository (on GitHub)](https://github.com/AuthorizeNet/sample-code-ruby)
83
81
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.
85
83
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.
87
85
*[Developer Center API Reference](http://developer.authorize.net/api/reference/index.html)
88
86
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.
90
88
91
89
## Create a Chase Pay Transaction
92
90
93
91
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.
94
92
95
93
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**
102
100
103
101
When using the SDK to submit Chase Pay transactions, consider the following points:
104
102
-`tokenRequesterName` must be populated with **`”CHASE_PAY”`**
@@ -109,7 +107,7 @@ When using the SDK to submit Chase Pay transactions, consider the following poin
109
107
## Building & Testing the SDK
110
108
111
109
### Running the SDK Tests
112
-
To run the integration tests (hitting the sandbox):
110
+
To run the integration tests in the sandbox:
113
111
```
114
112
rake spec
115
113
```
@@ -118,42 +116,41 @@ To run the unit tests:
118
116
rake spec:ci
119
117
```
120
118
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.
124
120
```ruby
125
121
#obtain an API login_id and transaction_id according to instructions at https://developer.authorize.net/faqs/#gettranskey
126
122
api_login_id: {login_id_value}
127
123
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}
130
124
```
131
125
132
126
### 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.
134
128
135
129
## 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:
137
131
```
138
132
loglevel: info
139
133
filepath: <file_path>
140
134
maskSensitiveData: true
141
135
```
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`.
143
137
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.
145
139
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
153
147
154
148
There is also a list of regular expressions which the sensitive logger uses to mask credit card numbers while logging.
155
149
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/).
157
154
158
155
## License
159
156
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
0 commit comments