QBXML Error: StatusCode 3020 “Invalid Date” on Credit Card Expiration Year

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


QBXML Error: StatusCode 3020 “Invalid Date” on Credit Card Expiration Year



I am working with the QBFC .Net wrapper for QBXML. I am trying to add a customer to Quickbooks from my .Net Winforms application, but I keep getting errors saying my "credit card expiration year" has an "invalid date".



I am using version 13 of the SDK:



SpecVersion Current version of qbXML in use: 13.0



Here's the error from the qbsdklog.txt



CustomerStorage::DoAdd Failed to set customer credit card expiration year: 2015 >QuickBooks error message: Invalid date. HRESULT=0x80040506



I've tried various integers (15, 2015, 2020, 2021, etc), but it simply won't accept anything, throws the same error every time.



Here's the code that I am using in my CusotmerAdd:



//Set field value for ExpirationMonth
CustomerAdd.CreditCardInfo.ExpirationMonth.SetValue(10);
//Set field value for ExpirationYear
CustomerAdd.CreditCardInfo.ExpirationYear.SetValue(2015);



I've done basics like rebooting QB, my IDE, and my PC to no avail. Also note, the same issue occurs if I work with my company file, as well as with the provided sample files.



If I remove the code that adds the credit card, the customer gets added properly. It seems specific to this credit card expiration year.



Has anyone else ever run into this? Seems so simple, I feel like I'm missing something basic, yet nothing I've tried is showing any results.



Thanks!




1 Answer
1



Ok, this was pretty basic issue, but not helped by the less than complete Quickbooks error messages. What led me to the solution was when I learned that I could reproduce the issue in the Desktop Client as well. To do so, simply provide a credit card expiration year that is less than the current year. Quickbooks should then throw the following error:
Error message says you need to be no later that the year 2037, however mentions nothing about a minimum year.
** Note 1 the text says nothing about a minimum year value, only maximum of 2037, yet will still not allow a user to edit the year if the value is lowen than current year.



Contacted Quickbooks support, and the rep confirmed that you cannot add a expiration year less than the current year. Testing that logic in the Desktop Application seems to prove it to be the case. I then applied the same logic to my application, and sure enough I could add customers with credit cards.



** Note 2, I was still getting failures attempting to add expiry years greater than the current year in my tests (as referenced in my question). I believe those failures were due to caching on my end retaining the bad (2015) year value.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

u z4CYfVn7qbfs8c5h RaTYZUNqhWKSEcV3,CK,V,vP mU9xMFkhOx
eSn DrKW OkcnCt,BijXhapFtLy3b KfZcEO ZSb8m86S5FH9Lzmf9E5X5vqg5Iq7DgO,dOm,ylAZWKsvij6HLji

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template