cancel
Showing results for 
Search instead for 
Did you mean: 

Old C# "CIM" SDK, SaveCreditCard(...no-address...), getting E20007

Hi folks,

 

We're on a years-old "CIM" version of the authorize C# SDK. (This is in source-code form, and there are no version numbers in the project files, etc) Yes, we should migrate to the latest and greatest, but can't at the moment, and doing so is at least a month away.

 

All this time we've been routinely creating payer-profiles and payment-profiles without issue.

 

Due to a recent business change we've stopped asking payers for an address. Thus we can no longer use the with-address version of ICustomeGateway.SaveCreditCard(...), and are looking to switch to the SaveCreditCard(...) version that takes just credit card number, expiration, cvv as arguments.

 

Thing is, calling the no-address SaveCreditCard(...) version always results in E20007, "There is one or more missing or invalid required fields." (sample err xml doc below)

I reached out to authnet support to get documentation for the sdk version we're on, but was told they don't keep old docs, in an effort to have people migrate to newer libraries.

 

Sample code for the current C# SDK shows validation being turned off during SaveCreditCard(...) (@see https://github.com/AuthorizeNet/sample-code-csharp/blob/master/CustomerProfiles/CreateCustomerPaymen..., line 51). That seems ... odd. Is that how it's done now?

 

If anybody has experience w/ the old CIM methods, and knows how to save a paymentprofile w/ just credit card details +, say, a name, it would make my day -- please would you chime in!

 

Here's a sample of the xml error-doc I retrieved while debugging:

==========

<?xml version="1.0" encoding="UTF-8"?>
-<createCustomerPaymentProfileResponse xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<messages>
<resultCode>Error</resultCode>
-<message>
<code>E00027</code>
<text>There is one or more missing or invalid required fields.</text>
</message>
</messages>
<validationDirectResponse>3,1,290,There is one or more missing or invalid required fields.,,P,0,none,Test transaction for ValidateCustomerPaymentProfile.,0.00,CC,auth_only,none,,,,,,,,,,,email@example.com,,,,,,,,,0.00,0.00,0.00,FALSE,none,F68A9C87C1E1472521704EF38C21F647,,,,,,,,,,,,,XXXX5221,Visa,,,,,,,,,,,,,,,,,</validationDirectResponse>
</createCustomerPaymentProfileResponse>

==========

netev
Member
1 REPLY 1

Hi,

 

A similar post about this is listed here: https://community.developer.authorize.net/t5/Integration-and-Testing/Store-card-in-account-with-prod...

 

For your particular case, when you create a CustomerGateway object, you can specify the validation mode you need.

 

public CustomerGateway(string apiLogin, string transactionKey, ServiceMode mode, validationModeEnum? validationMode = null)

 

  • Use testMode to perform a Luhn mod-10 check on the card number, without further validation.
  • Use liveMode to submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.

The liveMode requires the address field and the zip code field or it will return the error message you are getting.

 

For your information, we are deprecating the CIM part of the SDK. The same functionality can be obtained from our Customer Profiles APIs which I find is easier to integrate and use. Perhaps, you would like to take a look at them.

 

 

Thanks.

gnongsie13
Developer Developer
Developer