title: get customer payment ids from CIM
body: <p>How can I get <strong>customer payment method ids</strong> from <strong><code>AuthorizeNetCIM_Response</code></strong> object?</p>
  
  <p>There's a method in <code>AuthorizeNetCIM_Response</code> which is supposed to return <strong>payment method ids</strong></p>
  
  <pre><code>public function getCustomerPaymentProfileIds()
  {
      $ids = (array)$this-&gt;xml-&gt;customerPaymentProfileIdList;
      return $ids["numericString"];
  }
  </code></pre>
  
  <p>but calling this function results in error  </p>
  
  <blockquote>
    <p>Notice: Undefined index: numericString</p>
  </blockquote>
  
  <p>The response object outputs as:</p>
  
  <pre><code>AuthorizeNet_AuthorizeNetCIMResponse Object
  (
      [xml] =&gt; SimpleXMLElement Object
          (
              [messages] =&gt; SimpleXMLElement Object
                  (
                      [resultCode] =&gt; Ok
                      [message] =&gt; SimpleXMLElement Object
                          (
                              [code] =&gt; I00001
                              [text] =&gt; Successful.
                          )
                  )
              [profile] =&gt; SimpleXMLElement Object
                  (
                      [merchantCustomerId] =&gt; 10
                      [email] =&gt; user@nine.com
                      [customerProfileId] =&gt; 25441529
                      [paymentProfiles] =&gt; Array
                          (
                              [0] =&gt; SimpleXMLElement Object
                                  (
                                      [billTo] =&gt; SimpleXMLElement Object
                                          (
                                              [firstName] =&gt; 
                                              [lastName] =&gt; 
                                              [address] =&gt; 
                                              [city] =&gt; 
                                              [zip] =&gt; 
                                              [country] =&gt; 
                                              [phoneNumber] =&gt; 
                                          )
                                      [customerPaymentProfileId] =&gt; 23298664
                                      [payment] =&gt; SimpleXMLElement Object
                                          (
                                              [creditCard] =&gt; SimpleXMLElement Object
                                                  (
                                                      [cardNumber] =&gt; XXXX2224
                                                      [expirationDate] =&gt; XXXX
                                                  )
                                          )
                                  )
                              [1] =&gt; SimpleXMLElement Object
                                  (
                                      [customerType] =&gt; individual
                                      [billTo] =&gt; SimpleXMLElement Object
                                          (
                                              [firstName] =&gt; Test
                                              [lastName] =&gt; Individual
                                              [company] =&gt; SimpleXMLElement Object
                                                  (
                                                  )
  
                                              [address] =&gt; 
                                              [city] =&gt; 
                                              [state] =&gt; 
                                              [zip] =&gt; 
                                              [country] =&gt; 
                                              [phoneNumber] =&gt; SimpleXMLElement Object
                                                  (
                                                  )
  
                                              [faxNumber] =&gt; SimpleXMLElement Object
                                                  (
                                                  )
                                          )
                                      [customerPaymentProfileId] =&gt; 23299421
                                      [payment] =&gt; SimpleXMLElement Object
                                          (
                                              [creditCard] =&gt; SimpleXMLElement Object
                                                  (
                                                      [cardNumber] =&gt; XXXX0027
                                                      [expirationDate] =&gt; XXXX
                                                  )
                                          )
                                  )
                          )
                  )
          )
  </code></pre>
  
  <p>and I supposed to get the array of <code>paymentProfiles</code> as</p>
  
  <blockquote>
    <p>$response->xml->profile->paymentProfiles;</p>
  </blockquote>
  
  <p>but it only returning the first element of <code>paymentProfiles</code> not an array.</p>