AuthorizeNet / sdk-python

Python SDK for the Authorize.Net API
Other
53 stars 82 forks source link

Multiple Accepting Headers #117

Closed sampocs closed 6 years ago

sampocs commented 6 years ago

I'm using the python-SDK in an AWS Lambda function and I noticed the following in my logs:

[WARNING] 2018-09-17T19:53:00.466Z 47785214-bab3-11e8-a21c-b3b49941b23e Multiple accepting paths for <class 'authorizenet.apicontractsv1.CTD_ANON_39'>

This same type of message is shown in the log for each api call, except the CTDANON## appears to change based on the type of API call I'm making. Could you provide any insight into what this warning means?

Thanks!

ashtru commented 6 years ago

This warning is given only for anonymous types present in the AnetAPI schema XSD.

Pyxb library is used to generate classes/elements from the above schema. When nested elements have the possibility of name clashes of the same element being used as a child of another object with a different type, Pyxb avoids this by naming these elements with CTDANON## .

If you see the schema above, some of the fields like profile have different types (e.g. anet:subscriptionCustomerProfileType, anet:customerProfilePaymentType ) when part of different type of requests. As such, there are multiple resolutions possible and the warning is generated. It's not an error, and not a source of concern.

sampocs commented 6 years ago

Got it - thank you for the reply!