<?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: Failed update customerpaymentprofile with echeck in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Failed-update-customerpaymentprofile-with-echeck/m-p/63413#M37543</link>
    <description>&lt;P&gt;The documentation for validationMode could be improved, it does not mention eChecks.&amp;nbsp;ValidationMode&amp;nbsp;does not work for eCheck payment profiles because eCheck transactions are not authorized in real-time like credit cards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;validationMode -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Indicates the processing mode for the request. If the customer profile contains no payment data, this field should not be sent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;String.&lt;BR /&gt;Use&amp;nbsp;testMode&amp;nbsp;to perform a Luhn mod-10 check on the card number, without further validation. Use&amp;nbsp;liveMode&amp;nbsp;to submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jun 2018 18:36:58 GMT</pubDate>
    <dc:creator>mmcguire</dc:creator>
    <dc:date>2018-06-15T18:36:58Z</dc:date>
    <item>
      <title>Failed update customerpaymentprofile with echeck</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Failed-update-customerpaymentprofile-with-echeck/m-p/63401#M37535</link>
      <description>&lt;P&gt;I'm attempting to update a CustomerPaymentProfile with validationMode = liveMode. It fails because echeck doesn't seem to support this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way for me to check if liveMode is supported before attempting an update with validationMode = liveMode?&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;This processor does not accept zero dollar authorization for this card type.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;def update_customer_payment_profile(
            self,
            payment,
            customerPaymentProfileId,
            first_name,
            last_name,
            contact_dictionary,
            company_name,
            set_as_default=True,
            validation_mode=ValidationMode.liveMode):

        print('Updating customer payment profile', customerPaymentProfileId)

        address = contact_dictionary.get('address')
        city = contact_dictionary.get('city')
        state = contact_dictionary.get('state')
        zip_code = contact_dictionary.get('zip_code')
        country = 'US'
        phone = contact_dictionary.get('phone')

        paymentProfile = apicontractsv1.customerPaymentProfileExType()
        paymentProfile.billTo = CustomerProfile.make_billTo(
            first_name, last_name, company_name, address,
            city, state, zip_code, country, phone)
        paymentProfile.payment = payment
        paymentProfile.customerPaymentProfileId = customerPaymentProfileId

        action = apicontractsv1.updateCustomerPaymentProfileRequest()
        action.merchantAuthentication = self.merchantAuth
        action.paymentProfile = paymentProfile
        action.customerProfileId = str(
            self.instance.authorizenet_customer_profile_id)
        action.validationMode = validation_mode.value

        controller = updateCustomerPaymentProfileController(action)
        controller.execute()

        response = controller.getresponse()

        if response.messages.resultCode == OK:
            msg = 'Successfully created a customer payment profile with id: {}'
            print(msg.format(customerPaymentProfileId))

            if set_as_default:
                self.instance.authorizenet_default_payment_profile_id = int(
                    customerPaymentProfileId)
                self.instance.save()

            return customerPaymentProfileId
        else:
            raise AuthorizeNetError(response.messages.message[0]['text'].text)

    def update_customer_payment_profile_echeck(
            self,
            customerPaymentProfileId,
            account_type,
            routing_number,
            account_number,
            name_on_account,
            bank_name,
            customer_type,
            first_name,
            last_name,
            contact_dictionary=None,
            company_name=None,
            use_model_address=True,
            set_as_default=True,
            validation_mode=ValidationMode.liveMode):

        contact_dictionary = self.create_contact_dictionary(
            use_model_address, contact_dictionary)

        payment = CustomerProfile.make_bankAccount(
            account_type, routing_number, account_number,
            name_on_account, bank_name)

        return self.update_customer_payment_profile(
            payment,
            customerPaymentProfileId,
            first_name,
            last_name,
            contact_dictionary,
            company_name,
            set_as_default,
            validation_mode)&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Jun 2018 18:40:32 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Failed-update-customerpaymentprofile-with-echeck/m-p/63401#M37535</guid>
      <dc:creator>sanaani</dc:creator>
      <dc:date>2018-06-14T18:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Failed update customerpaymentprofile with echeck</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Failed-update-customerpaymentprofile-with-echeck/m-p/63413#M37543</link>
      <description>&lt;P&gt;The documentation for validationMode could be improved, it does not mention eChecks.&amp;nbsp;ValidationMode&amp;nbsp;does not work for eCheck payment profiles because eCheck transactions are not authorized in real-time like credit cards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;validationMode -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Indicates the processing mode for the request. If the customer profile contains no payment data, this field should not be sent.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;String.&lt;BR /&gt;Use&amp;nbsp;testMode&amp;nbsp;to perform a Luhn mod-10 check on the card number, without further validation. Use&amp;nbsp;liveMode&amp;nbsp;to submit a zero-dollar or one-cent transaction (depending on card type and processor support) to confirm the card number belongs to an active credit or debit account.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 18:36:58 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Failed-update-customerpaymentprofile-with-echeck/m-p/63413#M37543</guid>
      <dc:creator>mmcguire</dc:creator>
      <dc:date>2018-06-15T18:36:58Z</dc:date>
    </item>
  </channel>
</rss>

