sample-code-python icon indicating copy to clipboard operation
sample-code-python copied to clipboard

Create a Customer Profile from a Transaction

Open diemuzi opened this issue 6 years ago • 1 comments

Following this guide

Python 3.7.2

Returns the following error: AttributeError: module 'authorizenet.apicontractsv1' has no attribute 'createCustomerProfileFromTransactionResponse'

As a very temporary fix I manually edited the apicontractsv1.py file and added the following lines:

createCustomerProfileFromTransactionResponse = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, 'createCustomerProfileFromTransactionResponse'), CTD_ANON_61, location=pyxb.utils.utility.Location('https://apitest.authorize.net/xml/v1/schema/AnetApiSchema.xsd', 3522, 2))

Namespace.addCategoryObject('elementBinding', createCustomerProfileFromTransactionResponse.name().localName(), createCustomerProfileFromTransactionResponse)

It's a very dirty hack, perhaps someone else can review and create a proper PR. Once this line was added, the expected response was received:

Successfully created a customer profile with id: XXXXXXX from transaction id: XXXXXXXXXX

diemuzi avatar Mar 20 '19 18:03 diemuzi

Hi,

Thank you for bringing this to our attention. We have a fix in place (#139) and it will be released as soon as possible.

gnongsie avatar Mar 22 '19 11:03 gnongsie