Coded a ASP.Net page to create customer profiles and customer payment profiles in the test/integration area. Using the test webservice. Earlier this week, was able to create both the cust profile and the cust payment profile using the test visa account number sent to me when creating my developer test account.
Today, when attempting to create the cust payment profile, am getting this error:
There is one or more missing or invalid required fields.
here is the validation direct response:
"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,none,none,none,none,none,none,none,none,0.00,0.00,0.00,FALSE,none,B113BF0F0F1B00CE63F9A6725670B800,,,,,,,,,,,,,XXXX0027,Visa,,,,,,,,,,,,,,,,"
here is the code I am using:
strCreditCardNbr =
"4007000000027"
strCreditCardExp =
"2014-12"
anCreditCard.cardNumber = strCreditCardNbr
anCreditCard.expirationDate = strCreditCardExp
anPaymentType.Item = anCreditCard
anCustPaymentProfile.payment = anPaymentType
anCustPaymentProfileResponse = ANService.CreateCustomerPaymentProfile(anMerchant, lngCustProfileId, anCustPaymentProfile, net.authorize.apitest.ValidationModeEnum.liveMode)
If
anCustPaymentProfileResponse.resultCode = net.authorize.apitest.MessageTypeEnum.Ok Then
lngCustPaymentProfileId = anCustPaymentProfileResponse.customerPaymentProfileId
Else
If anCustPaymentProfileResponse.resultCode = 39 Then
Master.ShowMessage(
"Customer Payment Profile already exists.")
ElseDim strErrMsg AsNewStringBuilder
strErrMsg.Append(
"Error: ")
For i As Int16 = 0 ToanCustPaymentProfileResponse.messages.Length - 1
strErrMsg.Append(anCustPaymentProfileResponse.messages(i).text)
strErrMsg.Append(
"<br />")
Next
Master.ShowMessage(strErrMsg.ToString)
ExitSubEndIf
End
If
I believe that I am populating all of the correct field to call this method, does it have something to do with the credit card number being used?
Thanks
12-08-2011 09:43 AM
I don't think that is a valid test credit card number. I'd stick to the ones in the SDKs:
Test Credit Card Numbers: - Set the expiration date to anytime in the future. - American Express Test Card=> 370000000000002 - Discover Test Card => 6011000000000012 - Visa Test Card => 4007000000027 - Second Visa Test Card => 4012888818888 - JCB => 3088000000000017 - Diners Club/ Carte Blanche=> 38000000000006
12-08-2011 09:48 AM
The credit card number I am using is 4007000000027, which is one listed in the SDK
12-08-2011 09:52 AM
Wow, I overlooked that twice. I guess that means it's time for lunch.
I also think that means it's not your issue.
12-08-2011 09:57 AM - edited 12-08-2011 09:59 AM
If the credit card number included in the SDk is coming back as invalid for testing purposes. How do I contact Authorize.Net to verify if the credit card number used in testing is the issue or is it a coding issue? The code has not changed and that credit card number worked before so I would have to say that it is not a code issue but an issue either with the credit card number not working as a test credit card number or something to do with the testing and integration environment with my test Developer account.
Thanks
12-08-2011 11:22 AM
I doubt it is the test card that is causing this issue but you can verify that by trying other test card numbers. If you get the same error then that rules out the test card number.
Visa: 4111-1111-1111-1111
MasterCard: 5111-1111-1111-1111
12-08-2011 11:37 AM
I got the same error when using this credit card number - 4111-1111-1111-1111. The error message is stating that a required field is invalid or missing.
Here is a code piece for calling the method to create a payment profile in an existing customer profile
anCreditCard.cardNumber = strCreditCardNbr
anCreditCard.expirationDate = strCreditCardExp
anPaymentType.Item = anCreditCard
anCustPaymentProfile.payment = anPaymentType
anCustPaymentProfileResponse = ANService.CreateCustomerPaymentProfile(anMerchant, lngCustProfileId, anCustPaymentProfile, net.authorize.apitest.ValidationModeEnum.liveMode)
I dimmed a credit card type and assigned the credit card number and experiation date to the respective properties of the credit card type. I dimmed a payment type and assigned the credit card type to an item of the payment type, I dimmed a custpaymentprofile type and assiged the payment type to the customerpaymentprofile payment property. I then call the creatcustomerpaymentprofile web service method, passing as parameters, the merchant type, the customerprofileid, the customerpaymentprofile type and the last parameter is the mode - I am passing liveMode. The is the same code I used earlier in the week and it worked.
Are there other credit card type properties that I am not populating that are required or is it the the customerpaymentprofile that is invalid or missing a required item?
If I change the credit card number or the expiration date to an erroneous value, the error message will state that the expiration date is invalid or the credit card number is invalid, so when using what I hope are correct values for the credit card and expiration date, I am not sure if this error message is for that part of the method call. I am at a loss for what would be missing for the payment type and I have verified that the customer profile id that I am using exists in the deveoper sandbox area.
Thanks
12-08-2011 02:34 PM
Hi rgsandell59,
Please note that Livemode validation requires billing address to be included. The reason code you're getting 290 would mean a required AVS value for zero dollar authorization was not submitted.
Thanks!
Joy
12-08-2011 03:30 PM
Joy
Thanks for the replay. When changing the mode to test, I was able to create a customer payment profile. Can I find in the documentation the requirements needed for using live mode? Also, where in the documentation can I find the value for any reason codes being passed within the validation response?
Thanks
12-09-2011 05:52 AM
The verbose version of error code 290 is as follows:
When submitting authorization requests for Visa, the address and zip code fields must be entered.
You can a table of error codes here, though the descriptions are often unhelpful:
http://www.authorize.net/support/merchant/Transaction_Response/Response_Reason_Codes_and_Response_Re...
And here's a tool for getting much more detailed info:
http://developer.authorize.net/tools/responsereasoncode/
I took some hours back 2-3 weeks ago and data mined these two sources and combined them into a PHP class. It's good reference even if you aren't using it:
http://www.fentonwebdesignfirm.com/downloads/Authorize.net/AuthorizeNetErrors.txt
I rather wonder why Authorize.net doesn't have anything like that, generated from the same database as the Response Reason Code Tool. Or even better, a verbose description returned with every transaction response (maybe if you set a flag requesting it...)
12-09-2011 10:39 AM