Closed
Description
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()
Metadata
Metadata
Assignees
Labels
No labels