Skip to content

IncompleteElementContentError when trying to create a customer #65

@grigored

Description

@grigored

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy