Skip to content

Commit ba8ef9b

Browse files
committed
Made changes to codes for SIM and AIM transactions. Included are only the changes for the solution ID.
As per the mail thread, + x_solution_id has been included in the AIM and SIM requests + x_solution_id used is of class Solution (since it is the old model class) * No other field (solution name and/or vendor name) needs to be added to the requests - Removed the comments about debugging - Removed the code to add x_solution_name to the requests (see point above)
1 parent f0b915b commit ba8ef9b

6 files changed

Lines changed: 20 additions & 25 deletions

File tree

src/main/java/net/authorize/aim/Transaction.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
import net.authorize.data.creditcard.CreditCard;
2828
import net.authorize.data.echeck.ECheck;
2929
import net.authorize.data.echeck.ECheckType;
30-
/* ADDED */
31-
import net.authorize.data.reporting.Solution;
30+
import net.authorize.data.reporting.Solution;
3231
import net.authorize.util.BasicXmlDocument;
3332
import net.authorize.util.DeepCopy;
3433
import net.authorize.util.HttpClient;
@@ -60,8 +59,7 @@ public class Transaction extends net.authorize.Transaction implements Serializab
6059
private Order order;
6160
private ShippingAddress shippingAddress;
6261
private ShippingCharges shippingCharges;
63-
/* ADDED */
64-
private Solution solution;
62+
private Solution solution;
6563
protected TransactionType transactionType;
6664
private boolean cardPresent = false;
6765
protected String MD5Value = null;
@@ -750,7 +748,6 @@ public void setSolutionField(Solution solution) {
750748

751749
if(solution != null) {
752750
this.requestMap.put(AuthNetField.X_SOLUTION_ID.getFieldName(), solution.getId()!=null?solution.getId():EMPTY_STRING);
753-
this.requestMap.put(AuthNetField.X_SOLUTION_NAME.getFieldName(), solution.getName()!=null?solution.getName():EMPTY_STRING);
754751
}
755752
}
756753

src/test/java/net/authorize/aim/cardpresent/CardPresentXMLTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
import net.authorize.data.creditcard.CreditCard;
1313
import net.authorize.data.xml.reporting.CardCodeResponseType;
1414
import net.authorize.util.BasicXmlDocument;
15-
// ADDED
16-
import net.authorize.data.reporting.Solution;
15+
import net.authorize.data.reporting.Solution;
1716

1817
import org.junit.Before;
1918
import org.junit.Test;
@@ -22,8 +21,7 @@ public class CardPresentXMLTest extends UnitTestData {
2221

2322
private Customer customer;
2423
private Order order;
25-
// ADDED
26-
private Solution solution;
24+
private Solution solution;
2725

2826
@Before
2927
public void setUp() {
@@ -44,7 +42,6 @@ public void setUp() {
4442
// create solution
4543
solution = Solution.createSolution();
4644
solution.setId("AAA100302");
47-
solution.setName("Test Solution #1");
4845
}
4946

5047
@Test

src/test/java/net/authorize/aim/cardpresent/functional_test/SimpleAuthCaptureTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
import net.authorize.data.Order;
1717
import net.authorize.data.creditcard.CardType;
1818
import net.authorize.data.creditcard.CreditCard;
19-
// ADDED
20-
import net.authorize.data.reporting.Solution;
19+
import net.authorize.data.reporting.Solution;
2120

2221
import org.junit.Before;
2322
import org.junit.Test;
@@ -30,8 +29,7 @@ public class SimpleAuthCaptureTest extends UnitTestData {
3029
private Customer customer;
3130
private Order order;
3231
private CreditCard creditCard = CreditCard.createCreditCard();
33-
// ADDED
34-
private Solution solution;
32+
private Solution solution;
3533

3634
@Before
3735
public void setUp() {
@@ -63,7 +61,6 @@ public void setUp() {
6361
// create solution
6462
solution = Solution.createSolution();
6563
solution.setId("AAA100302");
66-
solution.setName("Test Solution #1");
6764
}
6865

6966
@Test

src/test/java/net/authorize/aim/functional_test/MultiOrderAuth_Capture_Void_CreditTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
import net.authorize.data.ShippingAddress;
1818
import net.authorize.data.ShippingCharges;
1919
import net.authorize.data.creditcard.CreditCard;
20-
// ADDED
21-
import net.authorize.data.reporting.Solution;
20+
import net.authorize.data.reporting.Solution;
2221

2322
import org.junit.Before;
2423
import org.junit.Test;
@@ -36,8 +35,7 @@ public class MultiOrderAuth_Capture_Void_CreditTest extends UnitTestData {
3635
private ShippingCharges shippingCharges;
3736
private EmailReceipt emailReceipt;
3837
private static String splitTenderId = null;
39-
// ADDED
40-
private Solution solution;
38+
private Solution solution;
4139

4240
@Before
4341
public void setUp() throws Exception {
@@ -132,7 +130,6 @@ public void setUp() throws Exception {
132130
// create solution
133131
solution = Solution.createSolution();
134132
solution.setId("AAA100302");
135-
solution.setName("Test Solution #1");
136133
}
137134

138135
/**

src/test/java/net/authorize/aim/functional_test/SimpleAuthCaptureTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
import net.authorize.data.Order;
1212
import net.authorize.data.creditcard.CreditCard;
1313
import net.authorize.data.echeck.ECheck;
14-
// ADDED
15-
import net.authorize.data.reporting.Solution;
14+
import net.authorize.data.reporting.Solution;
1615

1716
import org.junit.Before;
1817
import org.junit.Test;
@@ -21,8 +20,7 @@ public class SimpleAuthCaptureTest extends UnitTestData {
2120

2221
private Customer customer;
2322
private Order order;
24-
// ADDED
25-
private Solution solution;
23+
private Solution solution;
2624

2725
@Before
2826
public void setUp() {
@@ -43,7 +41,6 @@ public void setUp() {
4341
// create solution
4442
solution = Solution.createSolution();
4543
solution.setId("AAA100302");
46-
solution.setName("Test Solution #1");
4744
}
4845

4946
@Test

src/test/java/net/authorize/sim/TransactionTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import net.authorize.data.Order;
1111
import net.authorize.data.creditcard.CreditCard;
1212
import net.authorize.sim.button.TextButton;
13+
import net.authorize.data.reporting.Solution;
1314

1415
import org.junit.Before;
1516
import org.junit.Test;
@@ -18,6 +19,7 @@ public class TransactionTest extends UnitTestData {
1819

1920
private Customer customer;
2021
private Order order;
22+
private Solution solution;
2123

2224
@Before
2325
public void setUp() {
@@ -34,6 +36,10 @@ public void setUp() {
3436
order = Order.createOrder();
3537
order.setDescription(orderDescription);
3638
order.setInvoiceNumber(invoiceNumber);
39+
40+
// create solution
41+
solution = Solution.createSolution();
42+
solution.setId("AAA100302");
3743
}
3844

3945
@Test
@@ -51,6 +57,7 @@ public void createFormWithNoPaymentRequest() {
5157
authCaptureTransaction.setCustomer(customer);
5258
authCaptureTransaction.setOrder(order);
5359
authCaptureTransaction.setCreditCard(creditCard);
60+
authCaptureTransaction.setSolutionField(solution);
5461

5562
String form = authCaptureTransaction.createForm(null, null, TextButton.createButton("submit_button", "Submit"));
5663

@@ -72,6 +79,7 @@ public void createFormWithNoPaymentRequestAndNonHiddenFields() {
7279
authCaptureTransaction.setCustomer(customer);
7380
authCaptureTransaction.setOrder(order);
7481
authCaptureTransaction.setCreditCard(creditCard);
82+
authCaptureTransaction.setSolutionField(solution);
7583

7684
authCaptureTransaction.addFormInput("x_card_num", null);
7785
authCaptureTransaction.addFormInput("x_exp_date", null);
@@ -95,6 +103,7 @@ public void createFormWithPaymentRequest() {
95103
TransactionType.AUTH_CAPTURE, 1, totalAmount);
96104
authCaptureTransaction.setCustomer(customer);
97105
authCaptureTransaction.setOrder(order);
106+
authCaptureTransaction.setSolutionField(solution);
98107
authCaptureTransaction.setShowPaymentForm(true);
99108
authCaptureTransaction.addFieldToRename("x_cust_id", "VIP Customer Id");
100109
authCaptureTransaction.addFieldToRename("x_last_name", "Sur Name");
@@ -113,6 +122,7 @@ public void createFormWithCustomFormInputs() {
113122
TransactionType.AUTH_CAPTURE, 1, totalAmount);
114123
authCaptureTransaction.setCustomer(customer);
115124
authCaptureTransaction.setOrder(order);
125+
authCaptureTransaction.setSolutionField(solution);
116126

117127
LinkedHashMap<String,String> input_options = new LinkedHashMap<String, String>();
118128
input_options.put("type", "text");

0 commit comments

Comments
 (0)