Skip to content

Changes for Release 1.9.8 #145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Oct 15, 2018
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8ff4cfb
update travis badge
adavidw Oct 10, 2017
9e919ef
update travis testing environments
adavidw Oct 10, 2017
e5b1bdd
Merge remote-tracking branch 'upstream/master'
adavidw Oct 10, 2017
c0997b4
Merge branch 'readme'
adavidw Oct 10, 2017
9383cb4
Merge remote-tracking branch 'upstream/master'
adavidw Nov 9, 2017
d5b766f
Remove testRequest from documentation (as per sunset plan)
adavidw Nov 15, 2017
89aaf18
SensitiveLogger for Java SDK
vijayabraj Jul 16, 2018
7a2af15
Merge pull request #139 from vijayabraj/master
kikmak42 Jul 16, 2018
3a99433
Merge pull request #125 from adavidw/testRequest
kikmak42 Jul 16, 2018
23bff6b
Deprecate old model code of Java SDK
vijayabraj Jul 20, 2018
e924732
Updating deprecation comments for old model code
vijayabraj Jul 26, 2018
cc81fe7
Updating README.md about old model code deprecation
vijayabraj Aug 10, 2018
5fef407
Updating MIGRATING.md
vijayabraj Aug 10, 2018
de0a1d8
Updating README.md and MIGRATING.md
vijayabraj Aug 10, 2018
379998d
Updating README.md and CONTRIBUTING.md
vijayabraj Aug 13, 2018
4b9f752
Merge branch 'future' of https://github.com/AuthorizeNet/sdk-java
vijayabraj Aug 24, 2018
f49c454
Updating CONTRIBUTING.md
vijayabraj Aug 24, 2018
44db5d8
Update classpath to include gson - SensitiveLogger
vijayabraj Sep 24, 2018
9961aeb
SDK Updates for ChasePay API Changes
ravishankar54 Sep 25, 2018
d489904
Updating README about Sensitive Logging in JavaSdk
vijayabraj Sep 27, 2018
a5f9454
Updating SensitiveLogger
vijayabraj Sep 28, 2018
7ca888d
Revert "Updating SensitiveLogger"
vijayabraj Oct 15, 2018
6368efc
Revert "Updating README about Sensitive Logging in JavaSdk"
vijayabraj Oct 15, 2018
ea93c55
Revert "Update classpath include gson SensitiveLogger"
vijayabraj Oct 15, 2018
43dac8b
Merge pull request #142 from vijayabraj/master
gnongsie Oct 15, 2018
d3a7180
Merge pull request #144 from ravishankar54/master
gnongsie Oct 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Thanks for contributing to the Authorize.Net Java SDK.

Before you submit a pull request, we ask that you consider the following:

- Submit an issue to state the problem your pull request solves or the funtionality that it adds. We can then advise on the feasability of the pull request, and let you know if there are other possible solutions.
- Part of the SDK is auto-generated based on the XML schema. Due to this auto-generation, we cannot merge contributions for request or response classes. You are welcome to open an issue to report problems or suggest improvements. Auto-generated classes include all files inside [contract/v1](https://github.com/AuthorizeNet/sdk-java/tree/master/src/main/java/net/authorize/api/contract/v1) and [controller](https://github.com/AuthorizeNet/sdk-java/tree/master/src/main/java/net/authorize/api/controller) folders, except [controller/base](https://github.com/AuthorizeNet/sdk-java/tree/master/src/main/java/net/authorize/api/controller/base).
- Files marked as deprecated are no longer supported. Issues and pull requests for changes to these deprecated files will be closed.
- Recent changes will be in the [future branch](https://github.com/AuthorizeNet/sdk-java/tree/future). Before submitting an issue or pull request, check the future branch first to see if a fix has already been merged.
- **Always use the future branch for pull requests.** We will first merge pull requests to the future branch, before pushing to the master branch for the next release.
105 changes: 105 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Migrating from Legacy Authorize.Net Classes

Authorize.Net no longer supports several legacy classes, including AIM, ARB and others listed below, as part of sdk-java. If you are using any of these, we recommend that you update your code to use the new Authorize.Net API classes under (net/authorize/api).

**For details on the deprecation and replacement of legacy Authorize.Net APIs, visit https://developer.authorize.net/api/upgrade_guide/.**

## Full list of classes that are no longer supported
| Class | New Feature | Sample Codes directory/repository |
|-------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| AIM (net/authorize/aim) | [PaymentTransactions](https://developer.authorize.net/api/reference/index.html#payment-transactions) | [sample-code-java/PaymentTransactions](https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions) |
| ARB (net/authorize/arb) | [RecurringBilling](https://developer.authorize.net/api/reference/index.html#recurring-billing) | [sample-code-java/Recurring Billing](https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/RecurringBilling) |
| CIM (net/authorize/cim) | [CustomerProfiles](https://developer.authorize.net/api/reference/index.html#customer-profiles) | [sample-code-java/CustomerProfiles](https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/CustomerProfiles) |
| SIM (net/authorize/sim) | [Accept Hosted](https://developer.authorize.net/content/developer/en_us/api/reference/features/accept_hosted.html) | Not available |
| Reporting (net/authorize/reporting) | [TransactionReporting](https://developer.authorize.net/api/reference/index.html#transaction-reporting) | [sample-code-java/TransactionReporting](https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/TransactionReporting) |

## Example
#### Old AuthorizeNetAIM example:
```java
import net.authorize.DeviceType;
import net.authorize.Environment;
import net.authorize.MarketType;
import net.authorize.Merchant;
import net.authorize.TransactionType;

import net.authorize.aim.Transaction;
import net.authorize.aim.cardpresent.Result;

import net.authorize.data.creditcard.CardType;
import net.authorize.data.creditcard.CreditCard;

public class ChargeCreditCard{

//AIM
public static void main(String[] args) {
CreditCard creditCard = CreditCard.createCreditCard();
creditCard.setCardType(CardType.VISA);
creditCard.setCreditCardNumber("4111111111111111");
creditCard.setExpirationMonth("12");
creditCard.setExpirationYear("2020");

merchant = Merchant.createMerchant(Environment.SANDBOX, apiLoginID, transactionKey);
merchant.setDeviceType(DeviceType.VIRTUAL_TERMINAL);
merchant.setMarketType(MarketType.RETAIL);

// create transaction
Transaction authCaptureTransaction = merchant.createAIMTransaction(
TransactionType.AUTH_CAPTURE, totalAmount);
authCaptureTransaction.setCreditCard(creditCard);

Result<Transaction> result = (Result<Transaction>) merchant.postTransaction(authCaptureTransaction);
}
}
```
#### Corresponding new model code (charge-credit-card):
```java
import java.math.BigDecimal;
import java.math.RoundingMode;

import net.authorize.Environment;
import net.authorize.api.contract.v1.*;
import net.authorize.api.controller.CreateTransactionController;
import net.authorize.api.controller.base.ApiOperationBase;

public class ChargeCreditCard {

public static void main(String[] args) {

// Set the request to operate in either the sandbox or production environment
ApiOperationBase.setEnvironment(Environment.SANDBOX);

// Create object with merchant authentication details
MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;
merchantAuthenticationType.setName(apiLoginId);
merchantAuthenticationType.setTransactionKey(transactionKey);

// Populate the payment data
PaymentType paymentType = new PaymentType();
CreditCardType creditCard = new CreditCardType();
creditCard.setCardNumber("4111111111111111");
creditCard.setExpirationDate("1220");
paymentType.setCreditCard(creditCard);

// Create the payment transaction object
TransactionRequestType txnRequest = new TransactionRequestType();
txnRequest.setTransactionType(TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value());
txnRequest.setPayment(paymentType);
txnRequest.setAmount(new BigDecimal(amount).setScale(2, RoundingMode.CEILING));

// Create the API request and set the parameters for this specific request
CreateTransactionRequest apiRequest = new CreateTransactionRequest();
apiRequest.setMerchantAuthentication(merchantAuthenticationType);
apiRequest.setTransactionRequest(txnRequest);

// Call the controller
CreateTransactionController controller = new CreateTransactionController(apiRequest);
controller.execute();

// Get the response
CreateTransactionResponse response = new CreateTransactionResponse();
response = controller.getApiResponse();

return response;
}
}
```
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ _Note: Support for building the SDK with either Ant or Maven has been made. Plea
* hamcrest-library-1.3.jar : unit testing
* jmock-2.6.0.jar : unit testing

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

### Contribution
- 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/).
- Before creating pull requests, please read [CONTRIBUTING.md](CONTRIBUTING.md)

### TLS 1.2
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.

Expand Down
9 changes: 9 additions & 0 deletions src/main/java/net/authorize/AuthNetField.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@

/**
* Enumeration to handle all the x_ field names and xml element names
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public enum AuthNetField {
ELEMENT__ACCOUNT_NUMBER("AccountNumber"),
ELEMENT__ACCOUNT_TYPE("AccountType"),
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/net/authorize/Merchant.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
* The Merchant is also responsible for creating transactions and
* posting them to the gateway are performed through the Merchant.
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public class Merchant implements Serializable {

/**
Expand Down Expand Up @@ -203,6 +211,7 @@ public void setUserRef(String userRef) {
*
* @return A newly created Transaction will be returned.
*/
@Deprecated
public net.authorize.aim.Transaction createAIMTransaction(TransactionType transactionType,
BigDecimal amount) {
return net.authorize.aim.Transaction.createTransaction(this, transactionType, amount);
Expand All @@ -217,6 +226,7 @@ public net.authorize.aim.Transaction createAIMTransaction(TransactionType transa
*
* @return A newly created Transaction will be returned.
*/
@Deprecated
public net.authorize.sim.Transaction createSIMTransaction(TransactionType transactionType,
long fingerPrintSequence, BigDecimal amount) {

Expand All @@ -231,6 +241,7 @@ public net.authorize.sim.Transaction createSIMTransaction(TransactionType transa
*
* @return A newly created Transaction will be returned.
*/
@Deprecated
public net.authorize.arb.Transaction createARBTransaction(net.authorize.arb.TransactionType transactionType, Subscription subscription) {

return net.authorize.arb.Transaction.createTransaction(this, transactionType, subscription);
Expand All @@ -243,6 +254,7 @@ public net.authorize.arb.Transaction createARBTransaction(net.authorize.arb.Tran
*
* @return A newly created Transaction will be returned.
*/
@Deprecated
public net.authorize.cim.Transaction createCIMTransaction(net.authorize.cim.TransactionType transactionType) {

return net.authorize.cim.Transaction.createTransaction(this, transactionType);
Expand All @@ -255,6 +267,7 @@ public net.authorize.cim.Transaction createCIMTransaction(net.authorize.cim.Tran
*
* @return A newly created Transaction will be returned.
*/
@Deprecated
public net.authorize.reporting.Transaction createReportingTransaction(net.authorize.reporting.TransactionType transactionType) {

return net.authorize.reporting.Transaction.createTransaction(this, transactionType);
Expand All @@ -268,6 +281,7 @@ public net.authorize.reporting.Transaction createReportingTransaction(net.author
* @return Result is returned with each post.
*
*/
@Deprecated
public net.authorize.Result<?> postTransaction(Transaction transaction) {

Result<Transaction> result = null;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/net/authorize/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
/**
* The method of payment for the transaction.
* CC (credit card) or ECHECK (electronic check).
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public enum PaymentMethod {
CREDIT_CARD("CC"),
E_CHECK("ECHECK"),
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/net/authorize/ResponseCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
* Response code indicates the overall status of the transaction
* with possible values of approved, declined, error, or held for review.
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public enum ResponseCode {
APPROVED(1, "This transaction has been approved."),
DECLINED(2, "This transaction has been declined"),
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/net/authorize/ResponseField.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@
*
* This enum is leveraged across all the integrations of
* AIM,SIM,DPM,ARB and CIM.
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public enum ResponseField {
RESPONSE_CODE(AuthNetField.X_RESPONSE_CODE.getFieldName()),
RESPONSE_SUBCODE(null),
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/net/authorize/ResponseReasonCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
/**
* Response Reason Code is a numeric representation of a more specific reason for the transaction status.
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*
*/
@Deprecated
public enum ResponseReasonCode {

RRC_1_1(ResponseCode.APPROVED, 1,"This transaction has been approved.", ""),
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/net/authorize/Result.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*/
@Deprecated
public abstract class Result<T> implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/net/authorize/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@

import org.w3c.dom.Node;

/**
*
* @deprecated since version 1.9.8
* @deprecated We have reorganized and simplified the Authorize.Net API to ease integration and to focus on merchants' needs.
* @deprecated We have deprecated AIM, ARB, CIM, and Reporting as separate options, in favor of AuthorizeNet::API (package: net.authorize.api.*).
* @deprecated We have also deprecated SIM as a separate option, in favor of Accept Hosted. See https://developer.authorize.net/api/reference/features/accept_hosted.html for details on Accept Hosted.
* @deprecated For details on AIM, see https://github.com/AuthorizeNet/sample-code-java/tree/master/src/main/java/net/authorize/sample/PaymentTransactions.
* @deprecated For details on the deprecation and replacement of legacy Authorize.Net methods, visit https://developer.authorize.net/api/upgrade_guide/.
*/
@Deprecated
public abstract class Transaction implements Serializable{

private static final long serialVersionUID = 1L;
Expand Down
Loading
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