<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: python, fail to provide payment information for createCustomProfileRequest() in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/python-fail-to-provide-payment-information-for/m-p/54209#M29222</link>
    <description>&lt;P&gt;I have found mistake, I did place my paymentProfiles to the root createCustomerProfileRequest class&lt;/P&gt;&lt;P&gt;but it needs to be placed to profile element of the root class. Here is working code:&lt;/P&gt;&lt;PRE&gt;def create_customer_profile():

	merchantAuth = apicontractsv1.merchantAuthenticationType()
	merchantAuth.name = constants.apiLoginId
	merchantAuth.transactionKey = constants.transactionKey


	createCustomerProfile = apicontractsv1.createCustomerProfileRequest()
	createCustomerProfile.merchantAuthentication = merchantAuth
	createCustomerProfile.profile = apicontractsv1.customerProfileType('jdoe' + str(random.randint(0, 10000)), 'John2 Doe', 'jdoe@mail.com')


	creditCard = apicontractsv1.creditCardType()
	creditCard.cardNumber = "4111111111111111"
	creditCard.expirationDate = "2020-12"

	payment = apicontractsv1.paymentType()
	payment.creditCard = creditCard

	billTo = apicontractsv1.customerAddressType()
	billTo.firstName = "John"
	billTo.lastName = "Snow"

	profile = apicontractsv1.customerPaymentProfileType()
	profile.payment = payment
	profile.billTo = billTo

	createCustomerProfile.profile.paymentProfiles = [profile]
	controller = createCustomerProfileController(createCustomerProfile)

	controller.execute()

	response = controller.getresponse()

	if (response.messages.resultCode=="Ok"):
		print "Successfully created a customer profile with id: %s" % response.customerProfileId
	else:
		print "Failed to create customer payment profile %s" % response.messages.message[0].text

	return response&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Mar 2016 18:26:43 GMT</pubDate>
    <dc:creator>Aidamir</dc:creator>
    <dc:date>2016-03-31T18:26:43Z</dc:date>
    <item>
      <title>python, fail to provide payment information for createCustomProfileRequest()</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/python-fail-to-provide-payment-information-for/m-p/54207#M29220</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to validate payment information during createCustomProfileRequest() call, to avoid of doing subseqent requests. In Request specification listed payment and paymentProfiles, but when I try to include one of them to sample code it just silently ignores it. Here is my code below. Please point me what I doing wrong? May be it is simply not realized for python? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def create_customer_profile():

	merchantAuth = apicontractsv1.merchantAuthenticationType()
	merchantAuth.name = constants.apiLoginId
	merchantAuth.transactionKey = constants.transactionKey


	createCustomerProfile = apicontractsv1.createCustomerProfileRequest()
	createCustomerProfile.merchantAuthentication = merchantAuth
	createCustomerProfile.profile = apicontractsv1.customerProfileType('jdoe' + str(random.randint(0, 10000)), 'John2 Doe', 'jdoe@mail.com')


	creditCard = apicontractsv1.creditCardType()
	creditCard.cardNumber = "4111111111111111"
	creditCard.expirationDate = "2020-12"

	payment = apicontractsv1.paymentType()
	payment.creditCard = creditCard


	createCustomerProfile.payment = payment

	controller = createCustomerProfileController(createCustomerProfile)

	controller.execute()

	response = controller.getresponse()

	if (response.messages.resultCode=="Ok"):
		print "Successfully created a customer profile with id: %s" % response.customerProfileId
	else:
		print "Failed to create customer payment profile %s" % response.messages.message[0].text

	return response

if(os.path.basename(__file__) == sys.argv[0].split('/')[-1]):
	create_customer_profile()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 16:53:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/python-fail-to-provide-payment-information-for/m-p/54207#M29220</guid>
      <dc:creator>Aidamir</dc:creator>
      <dc:date>2016-03-31T16:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: python, fail to provide payment information for createCustomProfileRequest()</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/python-fail-to-provide-payment-information-for/m-p/54209#M29222</link>
      <description>&lt;P&gt;I have found mistake, I did place my paymentProfiles to the root createCustomerProfileRequest class&lt;/P&gt;&lt;P&gt;but it needs to be placed to profile element of the root class. Here is working code:&lt;/P&gt;&lt;PRE&gt;def create_customer_profile():

	merchantAuth = apicontractsv1.merchantAuthenticationType()
	merchantAuth.name = constants.apiLoginId
	merchantAuth.transactionKey = constants.transactionKey


	createCustomerProfile = apicontractsv1.createCustomerProfileRequest()
	createCustomerProfile.merchantAuthentication = merchantAuth
	createCustomerProfile.profile = apicontractsv1.customerProfileType('jdoe' + str(random.randint(0, 10000)), 'John2 Doe', 'jdoe@mail.com')


	creditCard = apicontractsv1.creditCardType()
	creditCard.cardNumber = "4111111111111111"
	creditCard.expirationDate = "2020-12"

	payment = apicontractsv1.paymentType()
	payment.creditCard = creditCard

	billTo = apicontractsv1.customerAddressType()
	billTo.firstName = "John"
	billTo.lastName = "Snow"

	profile = apicontractsv1.customerPaymentProfileType()
	profile.payment = payment
	profile.billTo = billTo

	createCustomerProfile.profile.paymentProfiles = [profile]
	controller = createCustomerProfileController(createCustomerProfile)

	controller.execute()

	response = controller.getresponse()

	if (response.messages.resultCode=="Ok"):
		print "Successfully created a customer profile with id: %s" % response.customerProfileId
	else:
		print "Failed to create customer payment profile %s" % response.messages.message[0].text

	return response&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2016 18:26:43 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/python-fail-to-provide-payment-information-for/m-p/54209#M29222</guid>
      <dc:creator>Aidamir</dc:creator>
      <dc:date>2016-03-31T18:26:43Z</dc:date>
    </item>
  </channel>
</rss>

