Skip to content
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

IncompleteElementContentError when trying to create a customer #65

Closed
grigored opened this issue Sep 16, 2016 · 3 comments
Closed

IncompleteElementContentError when trying to create a customer #65

grigored opened this issue Sep 16, 2016 · 3 comments

Comments

@grigored
Copy link

I'm following the code in the examples to create a new customer profile and tokenize his credit card. If I plug in the sandbox credentials, it works fine, but if I put some production credentials I get a very cryptic exception:
File "/Users/grigore/ics/instacar-back/env/lib/python2.7/site-packages/pyxb/binding/content.py", line 493, in _diagnoseIncompleteContent raise pyxb.IncompleteElementContentError(self.__instance, cfg, symbols, symbol_set) pyxb.exceptions_.IncompleteElementContentError: (<authorizenet.apicontractsv1.CTD_ANON_35 object at 0x1064a0150>, <pyxb.utils.fac.Configuration object at 0x1064a0190>, [<pyxb.binding.basis.ElementContent object at 0x1064a0090>], {})

Here's the code I'm running:

from authorizenet.apicontrollers import *

merchantAuth = apicontractsv1.merchantAuthenticationType()
merchantAuth.name = 'my_api_login_id'
merchantAuth.transactionKey = 'my_transaction_key'


credit_card = apicontractsv1.creditCardType()
credit_card.cardNumber = '4111111111111111'
credit_card.expirationDate = '2017-05'
credit_card.cardCode = '123'

payment = apicontractsv1.paymentType()
payment.creditCard = credit_card


payment_profile = apicontractsv1.customerPaymentProfileType()
payment_profile.payment = payment

profile = apicontractsv1.customerProfileType()
profile.paymentProfiles = [payment_profile]


create_customer_profile_request = apicontractsv1.createCustomerProfileRequest()
create_customer_profile_request.merchantAuthentication = merchantAuth
create_customer_profile_request.profile = profile

controller = createCustomerProfileController(create_customer_profile_request)
controller.execute()
@Sapbasu15
Copy link
Contributor

@grigored , can you please confirm if this issue is fixed in latest sdk release?

@Sapbasu15
Copy link
Contributor

Thank you for raising this issue. We have had some releases since the issue was raised, and we hope that these updates have resolved your asks. We are therefore closing this issue. Please raise a new issue, if you’re still facing problems, and we’ll look into it quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants
@Sapbasu15 @grigored and others