Skip to content

Commit 706e182

Browse files
authored
Update AuthorizeCreditCard.java
1 parent 9321bc0 commit 706e182

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
2323
MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType() ;
2424
merchantAuthenticationType.setName(apiLoginId);
2525
merchantAuthenticationType.setTransactionKey(transactionKey);
26-
ApiOperationBase.setMerchantAuthentication(merchantAuthenticationType);
2726

2827
// Populate the payment data
2928
PaymentType paymentType = new PaymentType();
@@ -38,8 +37,10 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Doub
3837
txnRequest.setPayment(paymentType);
3938
txnRequest.setAmount(new BigDecimal(amount).setScale(2, RoundingMode.CEILING));
4039

41-
// Make the API Request
40+
// Make the API Request & set the merchant details for this specific request
4241
CreateTransactionRequest apiRequest = new CreateTransactionRequest();
42+
apiRequest.setMerchantAuthentication(merchantAuthenticationType);
43+
4344
apiRequest.setTransactionRequest(txnRequest);
4445
CreateTransactionController controller = new CreateTransactionController(apiRequest);
4546
controller.execute();

0 commit comments

Comments
 (0)