Reply
Highlighted
Contributor
Posts: 12
Registered: ‎06-08-2017
Accepted Solution

Testing card errors when creating a customer profile

I'm writing an application that utilizes customer profiles. I'm currently trying to write integration tests for the creation of the customer profile.

 

I want to test the scenario where the user enters a bad credit card. I set the validation mode to LiveMode when making the request to createCustomerProfile. In the testing guide, it says when creating the payment nonce, I can use the zip code 46282 for the transaction to be declined. However, I got a successful response from the createCustomerProfile. In the validationDirectResponseList in the response, it says 'this transaction has been approved'?

 

Is it possible to force createCustomerProfile to decline the test transaction in sandbox?


Accepted Solutions
Highlighted
Solution
Accepted by topic author skyhijoseph1
‎06-28-2017 11:52 AM
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Testing card errors when creating a customer profile

Hi @skyhijoseph1,

 

If the validation is unsuccessful, the profile is not created, and you'll receive an error code. I can't find the exact reference off the top of my head, but I believe you'll receive E00027.

View solution in original post


All Replies
Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Testing card errors when creating a customer profile

Hi @skyhijoseph1,

 

I have bad news, I'm afraid. One of the limitations of that testing trigger in the sandbox is that it only works on an amount of 0.01 or greater. Since the liveMode validation in a profile creation is doing an authOnlyTransaction of 0.00 each time, it's going to show approved in sandbox.

 

In production, you could at least send a known non-working number to test a decline, but in sandbox, every number that appears valid (i.e. passes the Luhn check) will show as accepted.

 

 

I've let our developers know, but I'd also encourage you to post this onto our Ideas Forum where others can take a look, contribute feedback, and vote for new features.

Highlighted
Contributor
Posts: 12
Registered: ‎06-08-2017

Re: Testing card errors when creating a customer profile

Well, if the liveMode validation did fail, what would be returned in the response? Would the response be an error, or a success?

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Testing card errors when creating a customer profile

The response has a validationDirectResponseList element, which contains delimited response string, just like the response that you'd get back from our older AIM API. The response string can be customized in the merchant interface by choosing the delimiter character and the order of fields.

Highlighted
Contributor
Posts: 12
Registered: ‎06-08-2017

Re: Testing card errors when creating a customer profile

Ok, thank you for your responses.

 

I have one last question. If the customer profile fails validation, does the customer profile still get created?

Highlighted
Solution
Accepted by topic author skyhijoseph1
‎06-28-2017 11:52 AM
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Testing card errors when creating a customer profile

Hi @skyhijoseph1,

 

If the validation is unsuccessful, the profile is not created, and you'll receive an error code. I can't find the exact reference off the top of my head, but I believe you'll receive E00027.