-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected Element Error #138
Comments
Hi, Thank you for reaching out to us.
For the Can you provide me the input that you provided for this field? Your second error message is an error message for [Edit : Ok, I checked again and I honestly don't know what this message is referring to. It would really help to get the context for what request you were sending when you got this message.] Can you elaborate on how you got this message? |
Please check create customer payment profile with bankAccount.routingNumber '1111-1111-1'. |
If you do not understand that this issue about I will create example tommorow, my local time is 9 p.m. |
Hi, That is what I meant. The input '1111-1111-1' is wrong. The correct input should be '111111111'. The API expects a numeric string, which cannot include '-' or any other special characters. [EDIT:] I will check whether an error message is returned. |
I understand this is wrong. But why is CreateCustomerPaymentProfileResponse = null after execute CreateCustomerPaymentProfileController.executeWithApiResponse? And why there is log messages about parse errors from net.authorize.util.XmlUtility? Shouldn't api return CreateCustomerPaymentProfileResponse with error messages? |
It is about response = null. If string is too long. My company couldn't add some customer payment profiles, because companyName was too long. And it is no errors in response, because it is no response. |
Hi @no-fate , just to keep you updated, I've sent a fix for this and it will be available with the next release. You are free to check out CreateCustomerProfile Sample Code for how the current version handles error messages. Of course, this will change when the next version is released to make it more intuitive for the user to handle error messages. |
Thank you. I will check it after release. |
I am sorry, but version with fix is still not released. |
Hi @no-fate, unfortunately, the PR which I sent did not consider existing use cases. For example, there might be merchants who expect an empty response if there is a validation error. For now, there does not seem to be any plan to change the behavior of the API in that regard. As a workaround, please consider CreateCustomerProfile sample code as an example. This is the best that I can come up with for now, so as to satisfy all use cases. |
Ok, but I still not think it is proper behaviour, not to parse response from server. And I work with existing project of your client, so your example didn't help me. Finally I found restrictions to company name field, on https://developer.authorize.net/api/reference/index.html#customer-profiles-create-customer-payment-profile. Ok, maybe it is not error on your side, not to parse server response. But I think it is. It is not easy to understand what is going on, if you literally have no error messages, and nothing worth in your production logs. |
Hi,
There is error on create customer payment profile. If profile have any property length error then response = null, and 2 log messages from net.authorize.util.XmlUtility.
For example, if you create customer payment profile with bankAccount.routingNumber like '1111-1111-1' you will have this error. And if routingNumber is incorrect, but length is ok, like '111-111-1' then response is not null and this is ok. If routingNumber is correct then curstomer payment profile create, and response is ok.
This affects not only bankAccount.routingNumber, I saw same one on billTo.company too.
anet-sdk-java v.1.9.6
anet-sdk-java v.1.9.7
The text was updated successfully, but these errors were encountered: