8000 Updated README file · AuthorizeNet/sdk-java@5fe5b87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5fe5b87

Browse files
committed
Updated README file
1 parent 64b70ad commit 5fe5b87

File tree

1 file changed

+49
-37
lines changed

1 file changed

+49
-37
lines changed

README.md

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# Authorize.Net Java SDK
22

3-
[![Travis CI Status](https://travis-ci.org/AuthorizeNet/sdk-java.svg?branch=master)](https://travis-ci.org/AuthorizeNet/sdk-java)
4-
[![Code Climate](https://codeclimate.com/github/AuthorizeNet/sdk-java/badges/gpa.svg)](https://codeclimate.com/github/AuthorizeNet/sdk-java)
3+
[![Authorize.net Java CI](https://github.com/AuthorizeNet/sdk-java/actions/workflows/java-workflow.yml/badge.svg?branch=master)](https://github.com/AuthorizeNet/sdk-java/actions/workflows/java-workflow.yml)
54
[![Maven Central](https://img.shields.io/maven-central/v/net.authorize/anet-java-sdk.svg?style=flat)](http://mvnrepository.com/artifact/net.authorize/anet-java-sdk)
6-
5+
6+
## IMPORTANT NOTE
7+
8+
### Support for Java 1.8
9+
10+
**A new version that supports Java 1.8 is `v2.0.7`. This is the _LAST_ release with support for Java 1.8.**
11+
12+
### Support for Java 9 and higher
13+
14+
**A new version of the SDK has been released that supports Java 9 and higher. This new version is `v3.0.0`.**
15+
716
## Requirements
8-
* JDK 1.5.0 to JDK 1.8.0
17+
* JDK 9 and higher
918
* Ant 1.6.2 or higher (build SDK only)
1019
* Maven 2.2.0 or higher (build SDK only)
1120
* An Authorize.Net account (see _Registration & Configuration_ section below)
@@ -15,20 +24,28 @@ _Note 1: Support for building the SDK with either Ant or Maven has been made. Pl
1524
_Note 2: Support for higher versions of JDK (>= 1.9.0) has not been made available._
1625

1726
### Dependencies
18-
* commons-logging-1.1.1.jar : logging
19-
* log4j-2.17.1.jar : logging
20-
* httpclient-4.0.1.jar : http communication with the payment gateway
21-
* httpcore-4.0.1.jar : http communication with the payment gateway
22-
* junit-4.8.2.jar : unit testing
23-
* hamcrest-core-1.3.jar : unit testing
24-
* hamcrest-library-1.3.jar : unit testing
25-
* jmock-2.6.0.jar : unit testing
27+
* commons-logging-1.3.3
28+
* log4j-2.23.1
29+
* log4j-jcl-2.23.1
30+
* log4j-api-2.23.1
31+
* log4j-core-2.23.1
32+
* log4j-1.2-api-2.23.1
33+
* httpclient5-5.3.1
34+
* httpcore5-5.2.5
35+
* gson-2.11.0
36+
* jakarta.xml.bind-api-4.0.2
37+
* jaxb-runtime-4.0.5
38+
* jackson-module-jakarta-xmlbind-annotations-2.17.2
39+
* junit-4.13.1
40+
* hamcrest-core-1.3
41+
* hamcrest-library-1.3
42+
* jmock-2.6.0
2643

2744
### Migrating from older versions
28-
Since August 2018, the Authorize.Net API has been reorganized to be more merchant focused. Authorize.Net AIM, ARB, CIM, Transaction Reporting, and SIM classes have been deprecated in favor of `net\authorize\api`. To see the full list of mapping of new features corresponding to the deprecated features, see [MIGRATING.md](MIGRATING.md).
45+
Since August 2018, the Authorize.Net API has been reorganized to be more merchant focused. Authorize.Net AIM, ARB, CIM, Transaction Reporting, and SIM classes have been deprecated in favor of `net\authorize\api`. To see the full list of mapping of new features corresponding to the deprecated features, see [MIGRATING.md](MIGRATING.md).
2946

3047
### Contribution
31-
- 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.
48+
- 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.
3249
- Before creating pull requests, read [the contributors guide](CONTRIBUTING.md).
3350

3451
### TLS 1.2
@@ -68,7 +85,7 @@ Authorize.Net maintains a complete sandbox environment for testing and developme
6885
ApiOperationBase.setEnvironment(Environment.PRODUCTION);
6986
```
7087

71-
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
88+
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
7289

7390
## SDK Usage Examples and Sample Code
7491
When using this SDK, downloading the Authorize.Net sample code repository is recommended.
@@ -127,27 +144,22 @@ To create the javadocs:
127144
### Testing Guide
128145
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.
129146

130-
## Logging Sensitive Data
131-
132-
The Authorize.Net Java SDK uses Log4J framework for logging purposes. Enable the logger by keeping a configuration file `Log4j.properties` in the resources folder of the application. A sample [Log4.properties](https://github.com/AuthorizeNet/sdk-java/blob/master/resources/log4j.properties) file has been provided as a reference.
133-
134-
The possible log levels are `DEBUG, INFO, WARN, ERROR` and `FATAL`. There is a new pattern layout introduced to mask sensitive data while logging and can be used with the application by providing the following configurations in the `Log4j.properties` file:
135-
136-
```
137-
// Default configuration which logs the entries in clear text
138-
139-
log4j.appender.S.layout = org.apache.log4j.PatternLayout
140-
log4j.appender.R.layout = org.apache.log4j.PatternLayout
141-
142-
// Configuration which masks the sensitive data in the log entries
143-
144-
log4j.appender.S.layout = net.authorize.util.SensitiveFilterLayout
145-
log4j.appender.R.layout = net.authorize.util.SensitiveFilterLayout
146-
147-
```
148-
149-
By default the logger comes with two appenders, **console** and **file transport**.
150-
147+
## Logging Sensitive Data
148+
149+
The Authorize.Net Java SDK uses Log4J2 framework for logging purposes. Enable the logger by keeping a configuration file `log4j2.xml` in the resources folder of the application. A sample [log4j2.xml](https://github.com/AuthorizeNet/sdk-java/blob/master/resources/log4j2.xml) file has been provided as a reference.
150+
151+
The possible log levels are `DEBUG, INFO, WARN, ERROR` and `FATAL`. There is a new pattern layout introduced to mask sensitive data while logging and can be used with the application by making the following configurations in the `log4j2.xml` file:
152+
153+
1. Create your own appender under `<Appenders></Appenders>` and insert the `<PatternLayout><pattern></pattern></PatternLayout>` section. (Example is present in the `log4j2.xml` file)
154+
* To enable masking of sensitive data, replace `%m` with `%maskedMessage`.
155+
* To disable masking, replace `%maskedMessage` with `%m`.
156+
2. Create a logger under `<Loggers></Loggers>`
157+
3. The `name` field in the `<Logger>` should contain the namespace from where log messages needs to be written to file.
158+
4. Attach an `<AppenderRef>` section where the `ref` field uses one of the Appenders that have been created under the `<Appenders>` section.
159+
5. Do **NOT** modify the logger with `<Root>`.
160+
161+
By default the logger comes with two appenders, **LogToConsole** and **RollingFile**.
162+
151163
The sensitive fields that are masked during logging are:
152164
* Card Number
153165
* Card Code
@@ -156,7 +168,7 @@ The sensitive fields that are masked during logging are:
156168
* Account Number
157169
* Name on Account
158170

159-
There is also a list of regular expressions which the sensitive logger uses to mask credit card numbers while logging.
171+
There is also a list of regular expressions which the sensitive logger uses to mask credit card numbers while logging.
160172

161173
More information on the regular expressions used during sensitive data logging [can be found here](https://github.com/AuthorizeNet/sdk-java/blob/master/resources/AuthorizedNetSensitiveTagsConfig.json).
162174

0 commit comments

Comments
 (0)
0