<?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: Confused by CIM documentation (XML/PHP) in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Confused-by-CIM-documentation-XML-PHP/m-p/50751#M26166</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/18358"&gt;@4classjuggler&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you still have questions, or was you post below the solution you found?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://community.developer.authorize.net/t5/Integration-and-Testing/How-do-I-parse-the-result-message-from-a-CIM-call-in-PHP/m-p/50723#M26139" target="_blank"&gt;http://community.developer.authorize.net/t5/Integration-and-Testing/How-do-I-parse-the-result-message-from-a-CIM-call-in-PHP/m-p/50723#M26139&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2015 22:25:53 GMT</pubDate>
    <dc:creator>RichardH</dc:creator>
    <dc:date>2015-05-20T22:25:53Z</dc:date>
    <item>
      <title>Confused by CIM documentation (XML/PHP)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Confused-by-CIM-documentation-XML-PHP/m-p/50707#M26123</link>
      <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a long time CyberSource API user and a new Auth.net user. &amp;nbsp;We are a PHP application. &amp;nbsp;We are migrating our platform to Auth.net and I am already confused with the documentation. &amp;nbsp;I am starting with the documentation for the CIM as we do a lot of integration with profiles in our application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All of the&amp;nbsp;CIM online documentation (in beta, I think) located at&amp;nbsp;&lt;A target="_blank" href="http://developer.authorize.net/api/reference/index.html"&gt;http://developer.authorize.net/api/reference/index.html&lt;/A&gt; shows examples in an XML format. &amp;nbsp;However the PHP examples in the source code SDK I downloaded from github show exmples using PHP classes. &amp;nbsp;For example, to create a profile in the documentation says:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;
&amp;lt;createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"&amp;gt;  
   &amp;lt;merchantAuthentication&amp;gt;
     &amp;lt;name&amp;gt;API_LOGIN_ID&amp;lt;/name&amp;gt;
     &amp;lt;transactionKey&amp;gt;API_TRANSACTION_KEY&amp;lt;/transactionKey&amp;gt;
    &amp;lt;/merchantAuthentication&amp;gt;
   &amp;lt;profile&amp;gt;
     &amp;lt;merchantCustomerId&amp;gt;Merchant_Customer_ID&amp;lt;/merchantCustomerId&amp;gt;
     &amp;lt;description&amp;gt;Profile description here&amp;lt;/description&amp;gt;
     &amp;lt;email&amp;gt;customer-profile-email@here.com&amp;lt;/email&amp;gt;
     &amp;lt;paymentProfiles&amp;gt;
       &amp;lt;customerType&amp;gt;individual&amp;lt;/customerType&amp;gt;
          &amp;lt;payment&amp;gt;
             &amp;lt;creditCard&amp;gt;
                &amp;lt;cardNumber&amp;gt;4111111111111111&amp;lt;/cardNumber&amp;gt;
                &amp;lt;expirationDate&amp;gt;2020-12&amp;lt;/expirationDate&amp;gt;
              &amp;lt;/creditCard&amp;gt;
           &amp;lt;/payment&amp;gt;
      &amp;lt;/paymentProfiles&amp;gt;
    &amp;lt;/profile&amp;gt;
	&amp;lt;validationMode&amp;gt;testMode&amp;lt;/validationMode&amp;gt;
  &amp;lt;/createCustomerProfileRequest&amp;gt;&lt;/PRE&gt;&lt;P&gt;Whereas the PHP SDK example code (from file AuthorizeNetCIM_Test.php) shows examples like this:&lt;/P&gt;&lt;PRE&gt;    public function testCreateCustomerProfile()
  {
    // Create new customer profile
    $request = new AuthorizeNetCIM;
    $customerProfile = new AuthorizeNetCustomer;
    $customerProfile-&amp;gt;description = "Description of customer";
    $customerProfile-&amp;gt;merchantCustomerId = time().rand(1,100);
    $customerProfile-&amp;gt;email = "blahbla@domain.com";

    // Add payment profile.
    $paymentProfile = new AuthorizeNetPaymentProfile;
    $paymentProfile-&amp;gt;customerType = "individual";
    $paymentProfile-&amp;gt;payment-&amp;gt;creditCard-&amp;gt;cardNumber = "4111111111111111";
    $paymentProfile-&amp;gt;payment-&amp;gt;creditCard-&amp;gt;expirationDate = "2015-10";
    $customerProfile-&amp;gt;paymentProfiles[] = $paymentProfile;

    // Add another payment profile.
    $paymentProfile2 = new AuthorizeNetPaymentProfile;
    $paymentProfile2-&amp;gt;customerType = "business";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;accountType = "businessChecking";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;routingNumber = "121042882";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;accountNumber = "123456789123";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;nameOnAccount = "Jane Doe";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;echeckType = "WEB";
    $paymentProfile2-&amp;gt;payment-&amp;gt;bankAccount-&amp;gt;bankName = "Pandora Bank";
    $customerProfile-&amp;gt;paymentProfiles[] = $paymentProfile2;


    // Add shipping address.
    $address = new AuthorizeNetAddress;
    $address-&amp;gt;firstName = "john";
    $address-&amp;gt;lastName = "Doe";
    $address-&amp;gt;company = "John Doe Company";
    $address-&amp;gt;address = "1 Main Street";
    $address-&amp;gt;city = "Boston";
    $address-&amp;gt;state = "MA";
    $address-&amp;gt;zip = "02412";
    $address-&amp;gt;country = "USA";
    $address-&amp;gt;phoneNumber = "555-555-5555";
    $address-&amp;gt;faxNumber = "555-555-5556";
    $customerProfile-&amp;gt;shipToList[] = $address;

    // Add another shipping address.
    $address2 = new AuthorizeNetAddress;
    $address2-&amp;gt;firstName = "jane";
    $address2-&amp;gt;lastName = "Doe";
    $address2-&amp;gt;address = "11 Main Street";
    $address2-&amp;gt;city = "Boston";
    $address2-&amp;gt;state = "MA";
    $address2-&amp;gt;zip = "02412";
    $address2-&amp;gt;country = "USA";
    $address2-&amp;gt;phoneNumber = "555-512-5555";
    $address2-&amp;gt;faxNumber = "555-523-5556";
    $customerProfile-&amp;gt;shipToList[] = $address2;

    $response = $request-&amp;gt;createCustomerProfile($customerProfile);
    $this-&amp;gt;assertTrue($response-&amp;gt;isOk());
    $this-&amp;gt;assertEquals(2, count($response-&amp;gt;getCustomerShippingAddressIds()));
    $this-&amp;gt;assertEquals(2, count($response-&amp;gt;getCustomerPaymentProfileIds()));
    $customerProfileId = $response-&amp;gt;getCustomerProfileId();

... etc...

  }&lt;/PRE&gt;&lt;P&gt;I am much more comfortable with the latter as I am new to XML, but where can I find reliable documentation for the PHP class type calls instead of the XML version? &amp;nbsp;I am finding it very difficult to match the XML documentation back to the PHP class-style calls.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2015 22:08:36 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Confused-by-CIM-documentation-XML-PHP/m-p/50707#M26123</guid>
      <dc:creator>4classjuggler</dc:creator>
      <dc:date>2015-05-18T22:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Confused by CIM documentation (XML/PHP)</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Confused-by-CIM-documentation-XML-PHP/m-p/50751#M26166</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/18358"&gt;@4classjuggler&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you still have questions, or was you post below the solution you found?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://community.developer.authorize.net/t5/Integration-and-Testing/How-do-I-parse-the-result-message-from-a-CIM-call-in-PHP/m-p/50723#M26139" target="_blank"&gt;http://community.developer.authorize.net/t5/Integration-and-Testing/How-do-I-parse-the-result-message-from-a-CIM-call-in-PHP/m-p/50723#M26139&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Richard&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2015 22:25:53 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Confused-by-CIM-documentation-XML-PHP/m-p/50751#M26166</guid>
      <dc:creator>RichardH</dc:creator>
      <dc:date>2015-05-20T22:25:53Z</dc:date>
    </item>
  </channel>
</rss>

