Skip to content

Commit 0b48ae8

Browse files
committed
Removing CP/CNP reference
1 parent 009261e commit 0b48ae8

File tree

2 files changed

+2
-135
lines changed

2 files changed

+2
-135
lines changed

src/test/java/net/authorize/api/controller/test/ApiCoreTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@ public abstract class ApiCoreTestBase {
126126
//require only one cnp or cp merchant keys
127127
if ((null != apiLoginIdKey && null != transactionKey) )
128128
{
129-
logger.debug("At least one of CardPresent or CardNotPresent merchant keys are present.");
129+
logger.debug("Merchant keys are present.");
130130
}
131131
else
132132
{
133133
throw new IllegalArgumentException(
134134
"LoginId and/or TransactionKey have not been set. " +
135-
"At least one of CardPresent or CardNotPresent merchant keys are required.");
135+
"Merchant keys are required.");
136136
}
137137

138138
if (null != apiLoginIdKey && null != transactionKey)

src/test/java/net/authorize/api/controller/test/CreateTransactionTest.java

Lines changed: 0 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,22 @@
44
import java.math.RoundingMode;
55

66
import junit.framework.Assert;
7-
import net.authorize.Environment;
8-
import net.authorize.Merchant;
9-
import net.authorize.aim.Transaction;
10-
import net.authorize.api.contract.v1.CreateProfileResponse;
117
import net.authorize.api.contract.v1.CreateTransactionRequest;
128
import net.authorize.api.contract.v1.CreateTransactionResponse;
13-
import net.authorize.api.contract.v1.CreditCardMaskedType;
149
import net.authorize.api.contract.v1.CreditCardTrackType;
15-
import net.authorize.api.contract.v1.CreditCardType;
1610
import net.authorize.api.contract.v1.CustomerAddressType;
1711
import net.authorize.api.contract.v1.CustomerPaymentProfileType;
1812
import net.authorize.api.contract.v1.CustomerProfilePaymentType;
1913
import net.authorize.api.contract.v1.CustomerProfileType;
2014
import net.authorize.api.contract.v1.MerchantAuthenticationType;
2115
import net.authorize.api.contract.v1.MessagesType;
22-
import net.authorize.api.contract.v1.NameAndAddressType;
23-
import net.authorize.api.contract.v1.ObjectFactory;
2416
import net.authorize.api.contract.v1.PaymentProfile;
2517
import net.authorize.api.contract.v1.PaymentType;
2618
import net.authorize.api.contract.v1.TransRetailInfoType;
2719
import net.authorize.api.contract.v1.TransactionRequestType;
2820
import net.authorize.api.contract.v1.TransactionResponse;
2921
import net.authorize.api.contract.v1.TransactionTypeEnum;
3022
import net.authorize.api.controller.CreateTransactionController;
31-
import net.authorize.data.creditcard.CreditCard;
3223

3324
import org.junit.After;
3425
import org.junit.AfterClass;
@@ -311,129 +302,6 @@ public void validateCreateTransactionNonExistingShippingProfileId() {
311302
final String errorMessage = "Customer Shipping Address ID not found.";
312303
Assert.assertEquals( errorMessage, getFirstErrorText(failureResponse.getMessages()));
313304
}
314-
315-
@Test
316-
public void validateCreateTransactionMisMatchProfileIds() {
317-
CustomerProfileIdsHolder profileIdHolder1 = setupCustomersWithProfile(merchantAuthenticationType, customerProfileType, customerPaymentProfileOne, customerAddressOne, refId);
318-
CustomerProfileIdsHolder profileIdHolder2 = setupCustomersWithProfile(merchantAuthenticationType, customerProfileType, customerPaymentProfileOne, customerAddressOne, refId);
319-
320-
int customerProfileId = Integer.valueOf(profileIdHolder1.CustomerProfileId);
321-
int paymentProfileId = Integer.valueOf(profileIdHolder2.CustomerPaymentProfileId);
322-
CustomerProfileElementsHolder holder =
323-
setUpRequestForCreateTransaction(new CustomerProfileIdsHolder(customerProfileId, paymentProfileId, 0));
324-
CreateTransactionRequest createRequest = holder.createRequest;
325-
TransactionRequestType transactionRequestType = holder.transactionRequestType;
326-
327-
transactionRequestType.setBillTo( null);
328-
transactionRequestType.setPayment( null);
329-
transactionRequestType.setShipTo( null);
330-
CreateTransactionResponse failureResponse = executeTestRequestWithFailure(createRequest, CreateTransactionController.class, environment);
331-
teardownCustomersWithProfile(merchantAuthenticationType, profileIdHolder2, refId);
332-
teardownCustomersWithProfile(merchantAuthenticationType, profileIdHolder1, refId);
333-
334-
validateErrorCode( failureResponse.getMessages(), "E00040");
335-
final String errorMessage = "Customer Profile ID or Customer Payment Profile ID not found.";
336-
Assert.assertEquals( errorMessage, getFirstErrorText(failureResponse.getMessages()));
337-
}
338-
339-
//SKIP @Test
340-
public void testProfileTestCreateTransactionRequest() {
341-
CustomerProfileIdsHolder profileHolder1 = setupCustomersWithProfile(merchantAuthenticationType, customerProfileType, customerPaymentProfileOne, customerAddressOne, refId);
342-
CustomerProfileIdsHolder profileHolder2 = setupCustomersWithProfile(merchantAuthenticationType, customerProfileType, customerPaymentProfileOne, customerAddressOne, refId);
343-
344-
CustomerProfileElementsHolder holder = setUpRequestForCreateTransaction(profileHolder1);
345-
CreateTransactionRequest createRequest = holder.createRequest;
346-
CustomerProfilePaymentType customerProfilePaymentType = holder.customerProfilePaymentType;
347-
348-
// PaymentProfile paymentProfile = holder.paymentProfile;
349-
TransactionRequestType transactionRequestType = holder.transactionRequestType;
350-
351-
transactionRequestType.setBillTo( null);
352-
transactionRequestType.setPayment( null);
353-
transactionRequestType.setShipTo( null);
354-
customerProfilePaymentType.setPaymentProfile( customerProfilePaymentType.getPaymentProfile());
355-
customerProfilePaymentType.setShippingProfileId(null);
356-
357-
CreateTransactionResponse failureResponse = executeTestRequestWithFailure(createRequest, CreateTransactionController.class, environment);
358-
359-
teardownCustomersWithProfile(merchantAuthenticationType, profileHolder2, refId);
360-
teardownCustomersWithProfile(merchantAuthenticationType, profileHolder1, refId);
361-
Assert.assertEquals( "E00001", getFirstErrorCode(failureResponse.getMessages()));
362-
363-
364-
CreateTransactionResponse successResponse = executeTestRequestWithSuccess(createRequest, CreateTransactionController.class, environment);
365-
TransactionResponse transactionResponse = successResponse.getTransactionResponse();
366-
Assert.assertNotNull(transactionResponse);
367-
368-
NameAndAddressType shipTo = transactionResponse.getShipTo();
369-
//GETTING NULL
370-
//Assert.assertNotNull(shipTo);
371-
372-
//try in-valid combinations of customer profile elements
373-
//non-existing or belonging to other customer/ merchant
374-
PaymentProfile newPaymentProfile = null;
375-
String newShippingProfile = null;
376-
transactionRequestType.setBillTo(null);
377-
transactionRequestType.setPayment( null);
378-
transactionRequestType.setShipTo( null);
379-
customerProfilePaymentType.setPaymentProfile(newPaymentProfile);
380-
customerProfilePaymentType.setShippingProfileId(newShippingProfile);
381-
// paymentProfile.setPaymentProfileId(counterStr);
382-
failureResponse = executeTestRequestWithFailure(createRequest, CreateTransactionController.class, environment);
383-
Assert.assertEquals( "E00001", getFirstErrorCode(failureResponse.getMessages()));
384-
385-
/*
386-
transactionRequestType.setBillTo(null);
387-
transactionRequestType.setPayment( null);
388-
transactionRequestType.setShipTo( null);
389-
customerProfilePaymentType.setPaymentProfile(newPaymentProfile);
390-
customerProfilePaymentType.setShippingProfileId(newShippingProfile);
391-
paymentProfile.setPaymentProfileId(counterStr);
392-
failureResponse = executeTestRequestWithFailure(createRequest, CreateTransactionController.class, environment);
393-
Assert.assertEquals( "E00001", getFirstErrorCode(failureResponse.getMessages()));
394-
*/
395-
}
396-
/*
397-
@Test
398-
public void testCreateProfileWithCreateTransactionRequest() {
399-
400-
TransactionRequestType transactionRequestType = factory.createTransactionRequestType();
401-
transactionRequestType.setTransactionType( TransactionTypeEnum.AUTH_CAPTURE_TRANSACTION.value());
402-
transactionRequestType.setAmount( setValidTransactionAmount(counter));
403-
transactionRequestType.setPayment( paymentOne);
404-
transactionRequestType.setOrder( orderType);
405-
transactionRequestType.setCustomer( customerDataOne);
406-
transactionRequestType.setBillTo( customerAddressOne);
407-
transactionRequestType.setShipTo( customerAddressOne);
408-
409-
CustomerProfilePaymentType profilePayment = factory.createCustomerProfilePaymentType();
410-
profilePayment.setCreateProfile(true);
411-
transactionRequestType.setProfile(profilePayment);
412-
413-
CreateTransactionRequest createRequest = factory.createCreateTransactionRequest();
414-
createRequest.setMerchantAuthentication(merchantAuthenticationType);
415-
createRequest.setRefId(refId);
416-
createRequest.setTransactionRequest(transactionRequestType);
417-
418-
CreateTransactionResponse createResponse = executeTestRequestWithSuccess(createRequest, CreateTransactionController.class, environment);
419-
processTransactionResponse(createResponse);
420-
Assert.assertNotNull(createResponse.getTransactionResponse());
421-
CreateProfileResponse profileResponse = createResponse.getProfileResponse();
422-
Assert.assertNotNull(profileResponse);
423-
Assert.assertNotNull(profileResponse.getCustomerProfileId());
424-
Assert.assertNotNull(profileResponse.getCustomerPaymentProfileIdList());
425-
Assert.assertNotNull(profileResponse.getCustomerShippingAddressIdList());
426-
Assert.assertNotSame("0", profileResponse.getCustomerProfileId());
427-
428-
Assert.assertNotNull(profileResponse.getCustomerPaymentProfileIdList().getNumericString());
429-
Assert.assertSame(1, profileResponse.getCustomerPaymentProfileIdList().getNumericString().size());
430-
Assert.assertNotSame("0", profileResponse.getCustomerPaymentProfileIdList().getNumericString().get(0));
431-
432-
Assert.assertNotNull(profileResponse.getCustomerShippingAddressIdList().getNumericString());
433-
Assert.assertSame(1, profileResponse.getCustomerShippingAddressIdList().getNumericString().size());
434-
Assert.assertNotSame("0", profileResponse.getCustomerShippingAddressIdList().getNumericString().get(0));
435-
}
436-
*/
437305

438306
@Test
439307
public void testSetupCustomersWithProfile() {
@@ -675,6 +543,5 @@ class CustomerProfileElementsHolder {
675543

676544
public CreateTransactionRequest createRequest;
677545
public CustomerProfilePaymentType customerProfilePaymentType;
678-
//public PaymentProfile paymentProfile;
679546
public TransactionRequestType transactionRequestType;
680547
}

0 commit comments

Comments
 (0)
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