<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Tutorial: Integrate the Authorize.Net CIM API with PHP</title>
	<atom:link href="http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/</link>
	<description>John Conde&#039;s blog</description>
	<lastBuildDate>Tue, 31 Jan 2012 21:37:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Jeremy</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-4267</link>
		<dc:creator>Jeremy</dc:creator>
		<pubDate>Fri, 20 Jan 2012 05:56:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-4267</guid>
		<description>I just wanted to say thank you for taking the time to share this. I came across this via some google searching and it indeed made my life easier and does warrant me to take a moment to thank you.</description>
		<content:encoded><![CDATA[<p>I just wanted to say thank you for taking the time to share this. I came across this via some google searching and it indeed made my life easier and does warrant me to take a moment to thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dcolumbus</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-4263</link>
		<dc:creator>dcolumbus</dc:creator>
		<pubDate>Wed, 11 Jan 2012 19:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-4263</guid>
		<description>&lt;blockquote&gt;Unfortunately ARB and CIM do not work together as you cannot retrieve ARB information with it. So if you wish to use CIM you will need to change the whole process and use CIM from start to finish.&lt;/blockquote&gt;

So how does that work, exactly? If I wanted to use CIM because it manages my customer profiles, how can I automate the recurring billing?

Is there a way to tell whether or not someone&#039;s &quot;subscription&quot; is due and run a script to process the payment? If so, what would said script generally look like?</description>
		<content:encoded><![CDATA[<blockquote><p>Unfortunately ARB and CIM do not work together as you cannot retrieve ARB information with it. So if you wish to use CIM you will need to change the whole process and use CIM from start to finish.</p></blockquote>
<p>So how does that work, exactly? If I wanted to use CIM because it manages my customer profiles, how can I automate the recurring billing?</p>
<p>Is there a way to tell whether or not someone&#8217;s &#8220;subscription&#8221; is due and run a script to process the payment? If so, what would said script generally look like?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitchell</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3072</link>
		<dc:creator>Mitchell</dc:creator>
		<pubDate>Wed, 12 Oct 2011 02:32:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3072</guid>
		<description>No reply needed: it works. Thank you very much!</description>
		<content:encoded><![CDATA[<p>No reply needed: it works. Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitchell</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3071</link>
		<dc:creator>Mitchell</dc:creator>
		<pubDate>Tue, 11 Oct 2011 16:19:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3071</guid>
		<description>Hi John:
I am trying to create a &#039;Buy Now&#039; button with CIM.

Create transaction returns E00027. No help changing validationMode to testMode.

What am I doing wrong?

Thank you, Mitchell</description>
		<content:encoded><![CDATA[<p>Hi John:<br />
I am trying to create a &#8216;Buy Now&#8217; button with CIM.</p>
<p>Create transaction returns E00027. No help changing validationMode to testMode.</p>
<p>What am I doing wrong?</p>
<p>Thank you, Mitchell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Meet</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3052</link>
		<dc:creator>Meet</dc:creator>
		<pubDate>Sat, 27 Aug 2011 09:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3052</guid>
		<description>Loads of Thanks . You made my next few days easier... :)</description>
		<content:encoded><![CDATA[<p>Loads of Thanks . You made my next few days easier&#8230; <img src='http://www.johnconde.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3050</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 23 Aug 2011 21:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3050</guid>
		<description>Thanks for sharing this with us John....saved me hours and hours.

I had to make a modification to the class to get it to work..Maybe there is a better way to do what I&#039;ve done, but if so I wasn&#039;t able to figure it out.

If i plug in your code exactly as in the example you provided (changing the fields and what not) it will error out in the case of a repeat visitor, as when running createCustomerPaymentProfile it errors out stating that there is a duplicate payment profile.

CIM doesn&#039;t, however, tell us what the ID of the duplicate profile is. In your code you have a wrapper function for getCustomerProfile, but in the parseResults() function it doesn&#039;t seem to be prepared for the output of getCustomer Profile.

I therefore added another property to the class private $paymentProfiles;

I also added one private function to parse a nested xml element into an array:

private function xml2array ( $xmlObject, $out = array () ){
      foreach ( (array) $xmlObject as $index =&gt; $node )
        $out[$index] = ( is_object ( $node ) ) ? $this-&gt;xml2array ( $node ) : $node;

      return $out;
    }

then, on parseResults() i added: $this-&gt;paymentProfiles  = (array) $this-&gt;xml2array($xml-&gt;profile-&gt;paymentProfiles);

This way you can run getCustomerProfile, it will return the entire profile object and we can through payment profiles into the $cim-&gt;paymentProfiles variable. Then you can write a simple function that checks the last 4 of the CC against all existing profiles, and if there is a match it grabs that profile instead of trying to recreate it.

I&#039;m skipping creating Shipping profiles for simplicity&#039;s sake.

Is there a simpler way to go about what I just did? Otherwise my way is working...I guess I feel like I might be doing it wrong since nobody else has posted any issues in this thread.</description>
		<content:encoded><![CDATA[<p>Thanks for sharing this with us John&#8230;.saved me hours and hours.</p>
<p>I had to make a modification to the class to get it to work..Maybe there is a better way to do what I&#8217;ve done, but if so I wasn&#8217;t able to figure it out.</p>
<p>If i plug in your code exactly as in the example you provided (changing the fields and what not) it will error out in the case of a repeat visitor, as when running createCustomerPaymentProfile it errors out stating that there is a duplicate payment profile.</p>
<p>CIM doesn&#8217;t, however, tell us what the ID of the duplicate profile is. In your code you have a wrapper function for getCustomerProfile, but in the parseResults() function it doesn&#8217;t seem to be prepared for the output of getCustomer Profile.</p>
<p>I therefore added another property to the class private $paymentProfiles;</p>
<p>I also added one private function to parse a nested xml element into an array:</p>
<p>private function xml2array ( $xmlObject, $out = array () ){<br />
      foreach ( (array) $xmlObject as $index =&gt; $node )<br />
        $out[$index] = ( is_object ( $node ) ) ? $this-&gt;xml2array ( $node ) : $node;</p>
<p>      return $out;<br />
    }</p>
<p>then, on parseResults() i added: $this-&gt;paymentProfiles  = (array) $this-&gt;xml2array($xml-&gt;profile-&gt;paymentProfiles);</p>
<p>This way you can run getCustomerProfile, it will return the entire profile object and we can through payment profiles into the $cim-&gt;paymentProfiles variable. Then you can write a simple function that checks the last 4 of the CC against all existing profiles, and if there is a match it grabs that profile instead of trying to recreate it.</p>
<p>I&#8217;m skipping creating Shipping profiles for simplicity&#8217;s sake.</p>
<p>Is there a simpler way to go about what I just did? Otherwise my way is working&#8230;I guess I feel like I might be doing it wrong since nobody else has posted any issues in this thread.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3030</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Sat, 28 May 2011 17:15:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3030</guid>
		<description>Good post!</description>
		<content:encoded><![CDATA[<p>Good post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ndcisiv</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3020</link>
		<dc:creator>ndcisiv</dc:creator>
		<pubDate>Wed, 11 May 2011 19:08:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3020</guid>
		<description>After painfully working with creating the XML myself, I stumbled across your CLASS and it helped me to do everything I needed (which was importing thousands of profiles) within a few minutes of coding.  You saved me tons of time, thanks for the work.</description>
		<content:encoded><![CDATA[<p>After painfully working with creating the XML myself, I stumbled across your CLASS and it helped me to do everything I needed (which was importing thousands of profiles) within a few minutes of coding.  You saved me tons of time, thanks for the work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hina</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3013</link>
		<dc:creator>Hina</dc:creator>
		<pubDate>Thu, 21 Apr 2011 09:37:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3013</guid>
		<description>Is there any method to get a customer&#039;s profile using his/her email instead of using the Auth.Net Profile ID.</description>
		<content:encoded><![CDATA[<p>Is there any method to get a customer&#8217;s profile using his/her email instead of using the Auth.Net Profile ID.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Logan</title>
		<link>http://www.johnconde.net/blog/tutorial-integrate-the-authorize-net-cim-api-with-php/comment-page-1/#comment-3009</link>
		<dc:creator>Logan</dc:creator>
		<pubDate>Tue, 12 Apr 2011 16:36:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.johnconde.net/blog/?p=217#comment-3009</guid>
		<description>Thanks for this, haven&#039;t gotten to apply it yet but I can already tell you just saved me days of work...</description>
		<content:encoded><![CDATA[<p>Thanks for this, haven&#8217;t gotten to apply it yet but I can already tell you just saved me days of work&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

