Skip to content

Commit 4694a25

Browse files
author
srathod
committed
Adding prints for response codes and message codes.
1 parent 9e351fb commit 4694a25

22 files changed

Lines changed: 44 additions & 10 deletions

src/main/java/net/authorize/sample/MobileInappTransactions/CreateAnAcceptTransaction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey)
4444
TransactionResponse result = response.getTransactionResponse();
4545
if(result.getMessages() != null){
4646
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
47+
System.out.println("Response Code: " + result.getResponseCode());
48+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
4749
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
4850
System.out.println("Auth code : " + result.getAuthCode());
4951
}

src/main/java/net/authorize/sample/MobileInappTransactions/CreateAnAndroidPayTransaction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey) {
4444
TransactionResponse result = response.getTransactionResponse();
4545
if (result.getMessages() != null) {
4646
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
47+
System.out.println("Response Code: " + result.getResponseCode());
48+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
4749
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
4850
System.out.println("Auth code : " + result.getAuthCode());
4951
} else {

src/main/java/net/authorize/sample/MobileInappTransactions/CreateAnApplePayTransaction.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey)
4444
TransactionResponse result = response.getTransactionResponse();
4545
if(result.getMessages() != null){
4646
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
47+
System.out.println("Response Code: " + result.getResponseCode());
48+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
4749
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
4850
System.out.println("Auth code : " + result.getAuthCode());
4951
}

src/main/java/net/authorize/sample/PaymentTransactions/AuthorizeCreditCard.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
5353
TransactionResponse result = response.getTransactionResponse();
5454
if(result.getMessages() != null){
5555
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
56+
System.out.println("Response Code: " + result.getResponseCode());
57+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
5658
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
5759
System.out.println("Auth code: " + result.getAuthCode());
5860
}

src/main/java/net/authorize/sample/PaymentTransactions/CaptureFundsAuthorizedThroughAnotherChannel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
6161
TransactionResponse result = response.getTransactionResponse();
6262
if(result.getMessages() != null){
6363
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
64+
System.out.println("Response Code: " + result.getResponseCode());
65+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
6466
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
6567
System.out.println("Auth Code: " + result.getAuthCode());
6668
}

src/main/java/net/authorize/sample/PaymentTransactions/CapturePreviouslyAuthorizedAmount.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Stri
4242
TransactionResponse result = response.getTransactionResponse();
4343
if(result.getMessages() != null){
4444
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
45+
System.out.println("Response Code: " + result.getResponseCode());
46+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
4547
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
4648
System.out.println("Auth Code: " + result.getAuthCode());
4749
}

src/main/java/net/authorize/sample/PaymentTransactions/ChargeCreditCard.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
6262
TransactionResponse result = response.getTransactionResponse();
6363
if(result.getMessages() != null){
6464
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
65+
System.out.println("Response Code: " + result.getResponseCode());
66+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
6567
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
6668
System.out.println("Auth Code: " + result.getAuthCode());
6769
}

src/main/java/net/authorize/sample/PaymentTransactions/ChargeCustomerProfile.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Stri
6464
TransactionResponse result = response.getTransactionResponse();
6565
if(result.getMessages() != null){
6666
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
67+
System.out.println("Response Code: " + result.getResponseCode());
68+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
6769
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
6870
System.out.println("Auth Code: " + result.getAuthCode());
6971
}

src/main/java/net/authorize/sample/PaymentTransactions/ChargeTokenizedCreditCard.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
6363
TransactionResponse result = response.getTransactionResponse();
6464
if(result.getMessages() != null){
6565
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
66+
System.out.println("Response Code: " + result.getResponseCode());
67+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
6668
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
6769
System.out.println("Auth Code: " + result.getAuthCode());
6870
}

src/main/java/net/authorize/sample/PaymentTransactions/CreditBankAccount.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Stri
6666
TransactionResponse result = response.getTransactionResponse();
6767
if(result.getMessages() != null){
6868
System.out.println("Successfully created transaction with Transaction ID: " + result.getTransId());
69+
System.out.println("Response Code: " + result.getResponseCode());
70+
System.out.println("Message Code: " + result.getMessages().getMessage().get(0).getCode());
6971
System.out.println("Description: " + result.getMessages().getMessage().get(0).getDescription());
7072
System.out.println("Auth Code: " + result.getAuthCode());
7173
}

0 commit comments

Comments
 (0)