<?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: Cannot set default payment profile when using updateCustomerPaymentProfile in ruby in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79165#M49774</link>
    <description>&lt;P&gt;Solution is here:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/69468215/cannot-set-existing-payment-profile-to-be-the-default-for-a-customer" target="_blank"&gt;https://stackoverflow.com/questions/69468215/cannot-set-existing-payment-profile-to-be-the-default-for-a-customer&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Oct 2021 14:57:33 GMT</pubDate>
    <dc:creator>pandaiolo</dc:creator>
    <dc:date>2021-10-12T14:57:33Z</dc:date>
    <item>
      <title>Cannot set default payment profile when using updateCustomerPaymentProfile in ruby</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/78947#M49635</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;updateCustomerPaymentProfile endpoint to try to update a payment profile. This works well, except one field, &lt;STRONG&gt;defaultPaymentProfile&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The docs say it is an expected field, but the type does not allow it in ruby SDK, see in the official source code:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/AuthorizeNet/sdk-ruby/blob/002019e03a94ef582aa82983edf6a7a1a22b2316/lib/authorize_net/api/schema.rb#L1295" target="_blank"&gt;https://github.com/AuthorizeNet/sdk-ruby/blob/002019e03a94ef582aa82983edf6a7a1a22b2316/lib/authorize_net/api/schema.rb#L1295&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even after monkey patching the type, it sends the request but I receive an error response as following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;AuthorizeNetException: E00003: The element 'paymentProfile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'defaultPaymentProfile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd&lt;/PRE&gt;&lt;P&gt;As a reference, the block of code that I am using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;        profile = AuthorizeNet::API::CustomerPaymentProfileExType.new
        profile.customerPaymentProfileId = current_profile.customerPaymentProfileId
        profile.billTo = billTo
        profile.payment = AuthorizeNet::API::PaymentType.new(AuthorizeNet::API::CreditCardType.new(cc_data.cardNumber, cc_data.expirationDate)) 
        profile.taxId = user.tax_id if user.tax_id
        profile.defaultPaymentProfile = true
        profile.customerType = 'individual'

        request = AuthorizeNet::API::UpdateCustomerPaymentProfileRequest.new
        request.paymentProfile = profile
        request.customerProfileId = customer_profile_id
        request.validationMode = AuthorizeNet::API::ValidationModeEnum::LiveMode

        response = transaction.update_customer_payment_profile(request)&lt;/PRE&gt;&lt;P&gt;What am i doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Oct 2021 22:36:19 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/78947#M49635</guid>
      <dc:creator>pandaiolo</dc:creator>
      <dc:date>2021-10-01T22:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set default payment profile when using updateCustomerPaymentProfile in ruby</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79028#M49687</link>
      <description>&lt;P&gt;Anyone from Authorize.Net can confirm this / advise what to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 09:11:10 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79028#M49687</guid>
      <dc:creator>pandaiolo</dc:creator>
      <dc:date>2021-10-06T09:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set default payment profile when using updateCustomerPaymentProfile in ruby</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79035#M49690</link>
      <description>&lt;P&gt;I dumped the raw XML sent by the request when I patch the SDK:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;updateCustomerPaymentProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;
  &amp;lt;merchantAuthentication&amp;gt;
    &amp;lt;name&amp;gt;REDACTED&amp;lt;/name&amp;gt;
    &amp;lt;transactionKey&amp;gt;REDACTED&amp;lt;/transactionKey&amp;gt;
  &amp;lt;/merchantAuthentication&amp;gt;
  &amp;lt;customerProfileId&amp;gt;REDACTED&amp;lt;/customerProfileId&amp;gt;
  &amp;lt;paymentProfile&amp;gt;
    &amp;lt;customerType&amp;gt;individual&amp;lt;/customerType&amp;gt;
    &amp;lt;billTo&amp;gt;
      &amp;lt;firstName&amp;gt;REDACTED&amp;lt;/firstName&amp;gt;
      &amp;lt;lastName&amp;gt;REDACTED&amp;lt;/lastName&amp;gt;
      &amp;lt;address&amp;gt;REDACTED&amp;lt;/address&amp;gt;
      &amp;lt;city&amp;gt;REDACTED&amp;lt;/city&amp;gt;
      &amp;lt;state&amp;gt;REDACTED&amp;lt;/state&amp;gt;
      &amp;lt;zip&amp;gt;REDACTED&amp;lt;/zip&amp;gt;
      &amp;lt;country&amp;gt;REDACTED&amp;lt;/country&amp;gt;
      &amp;lt;phoneNumber&amp;gt;REDACTED&amp;lt;/phoneNumber&amp;gt;
    &amp;lt;/billTo&amp;gt;
    &amp;lt;payment&amp;gt;
      &amp;lt;creditCard&amp;gt;
        &amp;lt;cardNumber&amp;gt;XXXX4242&amp;lt;/cardNumber&amp;gt;
        &amp;lt;expirationDate&amp;gt;2022-03&amp;lt;/expirationDate&amp;gt;
      &amp;lt;/creditCard&amp;gt;
    &amp;lt;/payment&amp;gt;
    &amp;lt;customerPaymentProfileId&amp;gt;REDACTED&amp;lt;/customerPaymentProfileId&amp;gt;
    &amp;lt;defaultPaymentProfile&amp;gt;true&amp;lt;/defaultPaymentProfile&amp;gt;
  &amp;lt;/paymentProfile&amp;gt;
  &amp;lt;validationMode&amp;gt;liveMode&amp;lt;/validationMode&amp;gt;
&amp;lt;/updateCustomerPaymentProfileRequest&amp;gt;&lt;/PRE&gt;&lt;P&gt;Yes, this returns a malformed request response from the srever:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.authorize.net/api/reference/responseCodes.html?code=E00003" target="_blank" rel="noopener"&gt;E00003&lt;/A&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;The element 'paymentProfile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd' has invalid child element 'defaultPaymentProfile' in namespace 'AnetApi/xml/v1/schema/AnetApiSchema.xsd'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to be the same XML structure as shown in the API docs, yet it does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 14:51:51 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79035#M49690</guid>
      <dc:creator>pandaiolo</dc:creator>
      <dc:date>2021-10-06T14:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot set default payment profile when using updateCustomerPaymentProfile in ruby</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79165#M49774</link>
      <description>&lt;P&gt;Solution is here:&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/69468215/cannot-set-existing-payment-profile-to-be-the-default-for-a-customer" target="_blank"&gt;https://stackoverflow.com/questions/69468215/cannot-set-existing-payment-profile-to-be-the-default-for-a-customer&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Oct 2021 14:57:33 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cannot-set-default-payment-profile-when-using/m-p/79165#M49774</guid>
      <dc:creator>pandaiolo</dc:creator>
      <dc:date>2021-10-12T14:57:33Z</dc:date>
    </item>
  </channel>
</rss>

