<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>opensoul.org - Paypal IPN in Rails with Active Merchant Comments</title>
  <id>tag:www.opensoul.org,2010:/2006/9/16/paypal-ipn-in-rails-with-active-merchant/comments</id>
  <generator version="0.8.0" uri="http://mephistoblog.com">Mephisto Drax</generator>
  <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
  <updated>2010-03-11T00:33:36Z</updated>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>KeenToLearnRails</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:21202</id>
    <published>2010-03-11T00:33:36Z</published>
    <updated>2010-03-11T00:33:36Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by KeenToLearnRails</title>
<content type="html">&lt;p&gt;Hi,&lt;/p&gt;


	&lt;p&gt;Would anyone help me to resolve this problem &#8220;email address for the business is not present in the encrypted blob&#8221;? I have already spent two days trying to resolve this problme with no success.&lt;/p&gt;


	&lt;p&gt;I am building an on-line shopping application using Ruby on Rails. The payment is made via paypal. It works only I didn&#8217;t encrypted the payment information. The problem is it always returns an error stating that &#8220;email address for the business is not present in the encrypted blob&#8221;.. I follow the RailsCast 143 to implement the paypal security. The following are the step how to i implment the paypal security.&lt;/p&gt;


	&lt;p&gt;1. Log on the linux box and create a private key and my public certificate
private key
openssl genrsa -out app_key.pem 1024&lt;/p&gt;


	&lt;p&gt;My Public Certificate
openssl req -new -key app_key.pem -x509 -days 365 -out app_cert.pem&lt;/p&gt;


	&lt;p&gt;2. Upload my public certificate to Paypal sandbox and get the &lt;span class=&quot;caps&quot;&gt;CERT&lt;/span&gt;_ID&lt;/p&gt;


	&lt;p&gt;3. Download Paypal public certificate: paypal_cert.pem&lt;/p&gt;


	&lt;p&gt;Now I have 3 files under the certs directory
• app_cert.pem
• app_key.pem
• paypal_cert.pem&lt;/p&gt;


	&lt;p&gt;In my controller, it calls the encrypt function&lt;/p&gt;


	&lt;p&gt;values = {
:business =&amp;gt; &#8220;help.s_1260152087_biz@gmail.com&#8221;,
:cmd =&amp;gt; &#8220;_cart&#8221;,
:upload =&amp;gt; 1,
:currency_code =&amp;gt; &#8220;AUD&#8221;,
:handling_cart =&amp;gt; @order_log.postage,
:return =&amp;gt; return_paypal_url,
:notify_url =&amp;gt; notify_return_url,
:cert_id =&amp;gt; &#8220;STVF85MBT8XWS&#8221; 
}
counter = 0
@orders = Order.find(:all,:conditions =&amp;gt; { :order_log_id =&amp;gt; order_log_id.to_i })
@orders.each do | order |
counter = counter + 1
&lt;span class=&quot;caps&quot;&gt;RAILS&lt;/span&gt;_DEFAULT_LOGGER.info &#8220;item name[&#8221; + order.item_name + &#8221; |price[&#8221; + order.price.to_s + &#8220;]&#8221; 
values.merge!({
&#8220;item_number_#{counter}&#8221; =&amp;gt; counter,
&#8220;item_name_#{counter}&#8221; =&amp;gt; order.item_name,
&#8220;amount_#{counter}&#8221; =&amp;gt; order.price,
&#8220;quantity_#{counter}&#8221; =&amp;gt; order.quantity
})
end
encrypted_string = encrypt_for_paypal(values.to_query)&lt;/p&gt;


	&lt;p&gt;===
class ShippingDetail &amp;lt; ActiveRecord::Base
&lt;span class=&quot;caps&quot;&gt;PAYPAL&lt;/span&gt;_CERT_PEM = File.read(&#8221;#{Rails.root}/certs/paypal_cert.pem&#8221;)
&lt;span class=&quot;caps&quot;&gt;APP&lt;/span&gt;_CERT_PEM = File.read(&#8221;#{Rails.root}/certs/app_cert.pem&#8221;)
&lt;span class=&quot;caps&quot;&gt;APP&lt;/span&gt;_KEY_PEM = File.read(&#8221;#{Rails.root}/certs/app_key.pem&#8221;)&lt;/p&gt;


	&lt;p&gt;def encrypt_for_paypal(values)
signed = OpenSSL::PKCS7::sign(OpenSSL::X509::Certificate.new(APP_CERT_PEM), OpenSSL::PKey::RSA.new(APP_KEY_PEM, &#8217;&#8217;), values.map { |k, v| &#8221;#{k}=#{v}&#8221; }.join(&#8221;\n&#8221;), [], OpenSSL::PKCS7::BINARY)
OpenSSL::PKCS7::encrypt([OpenSSL::X509::Certificate.new(PAYPAL_CERT_PEM)], signed.to_der, OpenSSL::Cipher::Cipher::new(&#8220;DES3&#8221;), OpenSSL::PKCS7::BINARY).to_s.gsub(&#8221;\n&#8221;, &#8221;&#8221;)
end&lt;/p&gt;


&lt;h1&gt;end&lt;/h1&gt;


	&lt;p&gt;Web Page = The value of the encrypted field is encrypted.&lt;/p&gt;







	&lt;p&gt;==
But the Paypal returns error &#8220;Email address for the business is not presented in the encrypted blob&#8221;&lt;/p&gt;


	&lt;p&gt;Please help me to resolve this proble.. Because of this problem, we cannot launch our web site.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>JJ</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:18537</id>
    <published>2009-11-02T10:38:49Z</published>
    <updated>2009-11-02T10:38:49Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by JJ</title>
<content type="html">&lt;p&gt;How to check my paypal balance via Active Merchant?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>JJ</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:18262</id>
    <published>2009-10-19T14:44:41Z</published>
    <updated>2009-10-19T14:44:41Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by JJ</title>
<content type="html">&lt;p&gt;to add another parametr to &lt;span class=&quot;caps&quot;&gt;FORM&lt;/span&gt; (:lc =&amp;gt; “EN” – language) ?[/quote]&lt;/p&gt;


	&lt;p&gt;Dirty hack:&lt;/p&gt;


	&lt;p&gt;function AddLangToPaypalForm(lang){&lt;/p&gt;
	&lt;pre&gt;&lt;code&gt;var el = document.createElement('input');
  el.setAttribute('type', 'hidden');
  el.setAttribute('name', 'lc');
el.setAttribute('value', lang);
  var form = document.getElementById('paypal_form');
  form.appendChild(el);&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;}&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Don</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:16070</id>
    <published>2009-07-13T13:22:39Z</published>
    <updated>2009-07-13T13:22:39Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Don</title>
<content type="html">&lt;p&gt;How to add another parametr to &lt;span class=&quot;caps&quot;&gt;FORM&lt;/span&gt; (:lc =&amp;gt; &#8220;EN&#8221; &#8211; language) ?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>JJ</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10674</id>
    <published>2009-01-29T09:06:51Z</published>
    <updated>2009-01-29T09:06:51Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by JJ</title>
<content type="html">&lt;p&gt;With installed plugin collectiveidea-money and&lt;/p&gt;


	&lt;p&gt;money :current_cost #campaign.rb:6&lt;/p&gt;


	&lt;p&gt;I can&#8217;t restart server:&lt;/p&gt;


	&lt;p&gt;C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/hash/keys.rb:47:in `assert_valid_keys&#8217;: Unknown key(s): constructor, converter (ArgumentError)
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/aggregations.rb:145:in `composed_of&#8217;
        from C:/ruby/rails_apps/project_1/vendor/plugins/collectiveidea-money/lib/money/rails.rb:16:in `money&#8217;
        from C:/ruby/rails_apps/project_1/app/models/campaign.rb:6
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:216:in `load_without_new_constant_marking&#8217;
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:216:in `load_file&#8217;
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in `new_constants_in&#8217;
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:215:in `load_file&#8217;
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:96:in `require_or_load&#8217;
         ... 36 levels&#8230;
        from C:/ruby/ruby/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/server.rb:39
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require&#8217;
        from C:/ruby/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require&#8217;
        from script/server:3&lt;/p&gt;


	&lt;p&gt;without this plugin (with money :current_cost) I have error:&lt;/p&gt;


	&lt;p&gt;undefined method `money&#8217; for #&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10657</id>
    <published>2009-01-28T13:41:09Z</published>
    <updated>2009-01-28T13:41:09Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;JJ: Make sure you restart your server after installing plugins.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>JJ</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10655</id>
    <published>2009-01-28T09:27:48Z</published>
    <updated>2009-01-28T09:27:48Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by JJ</title>
<content type="html">&lt;p&gt;I have another error:&lt;/p&gt;


	&lt;p&gt;undefined method `money&#8217; for #&lt;/p&gt;


	&lt;p&gt;[code]
class Campaign &amp;lt; ActiveRecord::Base   
  money :current_cost 
end
[/code]&lt;/p&gt;


	&lt;p&gt;in environment.rb I have&lt;/p&gt;


	&lt;p&gt;require &#8216;money&#8217;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10645</id>
    <published>2009-01-28T01:14:01Z</published>
    <updated>2009-01-28T01:14:01Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;JJ,&lt;/p&gt;


	&lt;p&gt;Your model attributes need to be &lt;code&gt;Money&lt;/code&gt; objects.  See http://github.com/collectiveidea/money&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>JJ</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10638</id>
    <published>2009-01-27T12:48:59Z</published>
    <updated>2009-01-27T12:48:59Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by JJ</title>
<content type="html">&lt;p&gt;Hi,&lt;/p&gt;


I have errors in notify action 
&lt;code&gt;
if notify.acknowledge 
      campaign = Campaign.find(notify.item_id)
      begin

        if notify.complete? and campaign.current_cost == notify.amount
.
.
.
&lt;/code&gt;

	&lt;p&gt;campaign.current_cost is float and the error is &#8220;undefined method `cents&#8217; for 240.0:Float&#8221;&lt;/p&gt;


	&lt;p&gt;Another error&lt;/p&gt;


&lt;code&gt;
if notify.acknowledge 
      campaign = Campaign.find(notify.item_id)
      begin

        if notify.complete? 
            campaign.user.account.update_attribute(:balance, campaign.user.account.balance + notify.amount)
.
.
.
&lt;/code&gt;

	&lt;p&gt;Balance is float and the error is &#8220;Money can&#8217;t be coerced into Float &#8220;&lt;/p&gt;


	&lt;p&gt;Any ideas?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:10069</id>
    <published>2008-12-23T17:03:08Z</published>
    <updated>2008-12-23T17:03:08Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;Todd,&lt;/p&gt;


	&lt;p&gt;Keep in mind that Paypal will send you an &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; any time the status of the payment changes.  For example, for an e-check, they&#8217;ll send the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; with a pending status when the check is submitted, and then again when the check clears.  So check &lt;code&gt;notify.status&lt;/code&gt; to see if that is changing.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Todd</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:9934</id>
    <published>2008-12-16T15:46:31Z</published>
    <updated>2008-12-16T15:46:31Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Todd</title>
<content type="html">&lt;p&gt;Thanks for the write-up. I&#8217;m using AM to process my IPNs but I&#8217;m having some problems. PayPal is continuing to send IPNs after I call notify.acknowledge, so I&#8217;m assuming there is something wrong with the acknowledgment. I posted something on PayPal and this was the response I got&lt;/p&gt;


	&lt;p&gt;http://www.paypaldeveloper.com/pdn/board/message?board.id=ipn&#38;thread.id=15228&lt;/p&gt;


	&lt;p&gt;Has anyone else run into this issue? Any ideas? I can process the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; without any problems, but I don&#8217;t want PayPal re-sending IPNs when its not necessary.&lt;/p&gt;


	&lt;p&gt;Thanks.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>arash</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:9576</id>
    <published>2008-11-18T06:14:35Z</published>
    <updated>2008-11-18T06:14:35Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by arash</title>
<content type="html">&lt;p&gt;Possible security hole? The confirmation never checks to make sure the receivers email address in the Paypal &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; is equal to the &lt;span class=&quot;caps&quot;&gt;PAYPAL&lt;/span&gt;_ACCOUNT variable. Does this need to be done?&lt;/p&gt;


	&lt;p&gt;Eg. If a hacker takes the form variables that are generated by your app, and uses it for a payment on his own Website Payments Pro Merchant Paypal account and configures it to send its &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; notification to your controller, does that not effectively trick your app into thinking that a payment was sent (since the notify.acknowledge will be true since it is a real &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; notification sent by Paypal). Or does notify.acknowledge check to make sure the receiver_email in the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; equals &lt;span class=&quot;caps&quot;&gt;PAYPAL&lt;/span&gt;_ACCOUNT.&lt;/p&gt;


	&lt;p&gt;Please let me know as I am pondering this.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>skylarking</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:9502</id>
    <published>2008-11-14T20:36:13Z</published>
    <updated>2008-11-14T20:36:13Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by skylarking</title>
<content type="html">&lt;p&gt;Well, ok after a lot of headaches I&#8217;ve found out (thanks to this post on http://groups.google.com/group/activemerchant/browse_thread/thread/3198117936621ff7 by Cody Fauser ) that:&lt;/p&gt;


	&lt;p&gt;1) &lt;span class=&quot;caps&quot;&gt;DO NOT KNOW WHY&lt;/span&gt;??? &#8211; &lt;span class=&quot;caps&quot;&gt;DO NOT ASK ME&lt;/span&gt; since i wasted 3 days after this.. but it seems that following your guidelines on the site my gateway (PAYPAL &lt;span class=&quot;caps&quot;&gt;STANDARD&lt;/span&gt;)  doesn&#8217;t use notifications and just redirects the customer&#8217;s browser back to the seller&#8217;s site ( my success action in paymentscontroller).&lt;/p&gt;


	&lt;p&gt;Solution to this, do not ask me why? is to get rid of the notify url aka ipn action in the form helper and just move the whole notification thing into my success action of course doing there all the logic. This way it works fine, I&#8217;d like to receive any feedback from someone with more experience working with rails paypal and Am in general&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>skylarking</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:9501</id>
    <published>2008-11-14T16:20:30Z</published>
    <updated>2008-11-14T16:20:30Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by skylarking</title>
<content type="html">&lt;p&gt;Thanks for your great article! You did a great job in explaining how to integrate the wonderful AM plugin to  in an existing rails app. Now, everything seems to work flawlessly here, except for 1 thing. Actually I&#8217;ve setup my paymentscontroller actions to be: success, cancel and ipn. It seems I can succesfully pay by using the sandbox paypal account or cancel by going back to my corresponding success or cancel pages (actions), but I am having an hard time trying to understand why each time I receive the paypal post request back to my app it just &#8220;hangs&#8221; there ( actually I got the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; since i can see in console all the params paypal is sending). It seems I cannot actually create my @payment. I&#8217;ve understand that by default the payment status is set on &#8220;Pending&#8221; and it changes to &#8220;Complete&#8221; when you accept it by accessing your &lt;span class=&quot;caps&quot;&gt;SELLER&lt;/span&gt;/BUSINESS paypal account. Now, since the action(the ipn as well as the success and cancel) is setup into my form helper and i haven&#8217;t setup an &lt;span class=&quot;caps&quot;&gt;IPN URL&lt;/span&gt; in paypal, would it be possible to be notified when the status of the payment changes from pending to complete?Or do i need to actually configure the ipn url to be a public one by creating a new controller and action and set up that one url in paypal?Also, does the Notification.acknowledge method check only for a correct post back to paypal when it first posts the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; to my site or it does check that the status says &#8216;Complete&#8217;, reason why i cannot actually save my @payment to the database seems in the &lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; it says &#8216;Pending&#8217;? Last but not least since I am using named routes for my success, cancel and ipn actions, which methods should they have?Except for the redirect from paypal (success and cancel that should be :get) would the ipn be a :post? Thanks in advance&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Dave Clausen</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:7701</id>
    <published>2008-09-02T15:26:52Z</published>
    <updated>2008-09-02T15:26:52Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Dave Clausen</title>
<content type="html">&lt;p&gt;Spencer, I&#8217;m dealing with the security issue by using a shared secret in the &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; url as outlined on page 26-27 of Paypal&#8217;s Order Management Integration Guide located at: https://www.paypal.com/en_US/pdf/PP_OrderManagement_IntegrationGuide.pdf&lt;/p&gt;


	&lt;p&gt;Hope that helps.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Spencer Alexander</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:7056</id>
    <published>2008-08-05T22:03:19Z</published>
    <updated>2008-08-05T22:03:19Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Spencer Alexander</title>
<content type="html">&lt;p&gt;Question regarding security: On the notify action, where we format the &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; we get from paypal using Paypal::Notification.new(request.raw_post), do we need to worry at all about security and the validity of the &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt;? In otherwords, does Paypal::Notification automatically communicate with Paypal one final time to ensure that the &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; is legit?&lt;/p&gt;


	&lt;p&gt;Thanks again for the great tutorial!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Spencer Alexander</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:7054</id>
    <published>2008-08-05T19:28:46Z</published>
    <updated>2008-08-05T19:28:46Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Spencer Alexander</title>
<content type="html">&lt;p&gt;Great article! I&#8217;ve had a tough time getting everything set up with paypal and active merchant (not much documentation), and it&#8217;s great to come across well written tutorials like this.&lt;/p&gt;


	&lt;p&gt;Keep up the good work!&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brian</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:6630</id>
    <published>2008-06-27T04:53:44Z</published>
    <updated>2008-06-27T04:53:44Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brian</title>
<content type="html">&lt;p&gt;This looks great&#8230;last thing I&#8217;m wondering is how to process anything other than a successful order.  Such as a subscription cancellation, etc.  Are these in the notify.status variable?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Ramon Tayag</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:6307</id>
    <published>2008-05-30T10:56:07Z</published>
    <updated>2008-05-30T10:56:07Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Ramon Tayag</title>
<content type="html">&lt;p&gt;This definitely clears things up further!  Thank you.  However, how is payment.rb supposed to be?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Noah</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:5960</id>
    <published>2008-05-03T21:31:48Z</published>
    <updated>2008-05-03T21:31:48Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Noah</title>
<content type="html">Just a thought, but when PayPal has to convert currencies, they send back the status as pending, which causes the &#8220;If notify.complete?&#8221; to return false, so you may want to change it to something like this to perform different actions on different statuses.
&lt;pre&gt;
if notify.acknowledge
      begin
        case notify.status
        when &quot;Completed&quot; 
          @order.paypal_status = notify.status
          @order.transaction_id = notify.transaction_id
        when &quot;Pending&quot; 
          @order.paypal_status = &quot;Pending because: #{params[:pending_reason]}&quot; 
          @order.transaction_id = notify.transaction_id
        else
          @order.paypal_status = notify.status
          logger.error(&quot;Failed to verify Paypal's notification, please investigate&quot;)
        end
      ensure
        @order.save
      end
    end
&lt;/pre&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Roger Pack</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:5458</id>
    <published>2008-03-14T06:31:23Z</published>
    <updated>2008-03-14T06:31:23Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Roger Pack</title>
<content type="html">&lt;p&gt;gem install money, maybe?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Joel</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:5283</id>
    <published>2008-02-14T18:53:42Z</published>
    <updated>2008-02-14T18:53:42Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Joel</title>
<content type="html">&lt;p&gt;Hi, this is cool, but I get:&lt;/p&gt;


	&lt;p&gt;NameError (undefined local variable or method `‘money’&#8217; for main:Object):
    /app/controllers/payments_controller.rb:2&lt;/p&gt;


	&lt;p&gt;I have installed the money gem, do I need to do a require &#8216;money&#8217; in the environment.rb file? I tried that and I get:&lt;/p&gt;


	&lt;p&gt;/Library/Ruby/Gems/1.8/gems/money-1.7.1/lib/support/cattr_accessor.rb:7:in `cattr_reader&#8217;: undefined method `id2name&#8217; for {:instance_writer=&amp;gt;false}:Hash (NoMethodError)
    from /Library/Ruby/Gems/1.8/gems/money-1.7.1/lib/support/cattr_accessor.rb:5:in `each&#8217;
    from /Library/Ruby/Gems/1.8/gems/money-1.7.1/lib/support/cattr_accessor.rb:5:in `cattr_reader&#8217;
    from /Library/Ruby/Gems/1.8/gems/money-1.7.1/lib/support/cattr_accessor.rb:54:in `cattr_accessor&#8217;
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.6/lib/active_record/base.rb:268&lt;/p&gt;


	&lt;p&gt;at server startup, any ideas?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Vishwa</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:4433</id>
    <published>2007-12-08T16:04:13Z</published>
    <updated>2007-12-08T16:04:13Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Vishwa</title>
<content type="html">&lt;p&gt;Phil,
If you are still hitting this issue 
{NameError (uninitialized constant AccountController::Paypal):
Where is this PayPal class? It doesn’t seem to be in active merchant.}&lt;/p&gt;


	&lt;p&gt;you might want to try
ActiveMerchant::Billing::Integrations::Paypal.&lt;/p&gt;


	&lt;p&gt;Additionally ensure that you have done a require &#8216;active_merchant&#8217; in your environment.rb&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Matthias</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:4038</id>
    <published>2007-10-25T15:14:07Z</published>
    <updated>2007-10-25T15:14:07Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Matthias</title>
<content type="html">&lt;p&gt;thanks brandon&lt;/p&gt;


	&lt;p&gt;that&#8217;s the part who content the price&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def populate_order 
  for cart_item in @cart.cart_items 
    order_item = OrderItem.new( 
      :book_id =&amp;gt; cart_item.book_id, 
      :price =&amp;gt; cart_item.price - current_user.offre, 
      :amount =&amp;gt; cart_item.amount,
  :form_choice =&amp;gt; cart_item.form_choice,
  :time_choice =&amp;gt; cart_item.time_choice,
  :expire_at =&amp;gt; cart_item.expire_at    
    ) 
    @order.order_items &amp;lt;&amp;lt; order_item 
  end 
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;I don&#8217;t really understand your solution&#8230;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:4025</id>
    <published>2007-10-23T21:07:52Z</published>
    <updated>2007-10-23T21:07:52Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;Matthias,&lt;/p&gt;


	&lt;p&gt;The amount field is expecting a Money object, and if it doesn&#8217;t get one, it converts the integer, treating it as cents.&lt;/p&gt;


	&lt;p&gt;So you&#8217;ll want to pass in the number as cents.  If the amount is being stored in a model, you might want to check out &lt;a href=&quot;http://opensoul.org/2006/11/13/acts_as_money&quot;&gt;acts_as_money&lt;/a&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Matthias</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:4022</id>
    <published>2007-10-23T09:35:04Z</published>
    <updated>2007-10-23T09:35:04Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Matthias</title>
<content type="html">&lt;p&gt;Hi, i have just a little problem. When i process order and i look for the result in my paypal account i find my order, but the big problem is my total is divised by 100. Result i process an order with a total : 60 and the result in my paypal account is 0,60&lt;/p&gt;


	&lt;p&gt;Does someone can help me ??&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Jordan Brough</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3939</id>
    <published>2007-10-11T05:10:27Z</published>
    <updated>2007-10-11T05:10:27Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Jordan Brough</title>
<content type="html">&lt;p&gt;Thanks for the post, just what I was looking for.  Would be nice if PayPal was just set up so easy that we didn&#8217;t need a tool like ActiveMerchant though&#8230;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Phil</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3833</id>
    <published>2007-09-29T12:15:26Z</published>
    <updated>2007-09-29T12:15:26Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Phil</title>
<content type="html">&lt;p&gt;Looks good, but, why do I get this on the notify:&lt;/p&gt;


	&lt;p&gt;NameError (uninitialized constant AccountController::Paypal):&lt;/p&gt;


	&lt;p&gt;Where is this PayPal class? It doesn&#8217;t seem to be in active merchant.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Dinesh</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3643</id>
    <published>2007-09-08T22:02:44Z</published>
    <updated>2007-09-08T22:02:44Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Dinesh</title>
<content type="html">&lt;p&gt;Very helpful Brandon, I could able to set up my test paypal account in less than 15 min. Thanks a lot.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3603</id>
    <published>2007-09-05T13:14:01Z</published>
    <updated>2007-09-05T13:14:01Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;Mike: Thanks, I&#8217;ve updated the url in the post.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Mike</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3595</id>
    <published>2007-09-04T18:00:02Z</published>
    <updated>2007-09-04T18:00:02Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Mike</title>
<content type="html">&lt;p&gt;Thanks very much for such a helpful Active Merchant example.&lt;/p&gt;


	&lt;p&gt;The command you have listed for installing the AM plugin gives an access denied error, which I believe is because the repository has been moved. The new repository is at:
 http://activemerchant.googlecode.com/svn/trunk/active_merchant&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3354</id>
    <published>2007-08-10T02:00:09Z</published>
    <updated>2007-08-10T02:00:09Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;Observer,&lt;/p&gt;


	&lt;p&gt;The problem is that due to the way Paypal&#8217;s website payments work, the user needs to post all that data to paypal.  So no matter how you try to obfuscate it, you&#8217;re still dependent on the client to post all the details.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Observer</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3351</id>
    <published>2007-08-09T22:24:14Z</published>
    <updated>2007-08-09T22:24:14Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Observer</title>
<content type="html">&lt;p&gt;This is a great example.  Thanks for the informative blog post.  I&#8217;m wondering if maybe you might want to hide a lot of the details in the view in a controller, as in, just post the enrollment and user id and populate and redirect the form.  You can certainly encrypt a button through PayPal, but this might give you another way to hide details that someone can&#8217;t try and use to create a fake form post with an alteration.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3253</id>
    <published>2007-07-17T18:49:42Z</published>
    <updated>2007-07-17T18:49:42Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Justin</title>
<content type="html">&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;IPN&lt;/span&gt; Seems to be working for the most part, but the &#8220;If notify.complete?&#8221; part is never &lt;span class=&quot;caps&quot;&gt;TRUE&lt;/span&gt;.  What determines if that is true or not?  Is there something I need to do for it to be true?  Or is it completely in Paypal&#8217;s hands?&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3241</id>
    <published>2007-07-16T14:36:22Z</published>
    <updated>2007-07-16T14:36:22Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Justin</title>
<content type="html">&lt;p&gt;If I have require &#8216;money&#8217; in the environment.rb file I don&#8217;t need it in the controller right?&lt;/p&gt;


	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;FYI&lt;/span&gt;:  I was using &#8220;require &#8216;activemerchant&#8217;&#8221; in the environment.rb file which wasn&#8217;t working.  I didn&#8217;t realize that I needed an underscore.  Adding &#8220;require &#8216;active_merchant&#8217;&#8221; works just fine.  Thanks Brandon.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>inboulder</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3235</id>
    <published>2007-07-15T20:31:50Z</published>
    <updated>2007-07-15T20:31:50Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by inboulder</title>
<content type="html">&lt;p&gt;note: to get anything out of the notify object you need to put require &#8216;money&#8217; in the controller.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3208</id>
    <published>2007-07-12T22:22:34Z</published>
    <updated>2007-07-12T22:22:34Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Justin</title>
<content type="html">&lt;p&gt;I tried &#8220;require &#8216;activemerchant&#8217;&#8221; and got the error:&lt;/p&gt;


	&lt;p&gt;warning: already initialized constant &lt;span class=&quot;caps&quot;&gt;OPTIONS&lt;/span&gt;&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3207</id>
    <published>2007-07-12T22:19:34Z</published>
    <updated>2007-07-12T22:19:34Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Justin</title>
<content type="html">&lt;p&gt;Solved my problem after a &lt;span class=&quot;caps&quot;&gt;LOT&lt;/span&gt; of looking.&lt;/p&gt;


	&lt;p&gt;I originally installed ActiveMerchant using &#8220;gem install&#8221;.&lt;/p&gt;


	&lt;p&gt;My problem went away only after I installed ActiveMerchant as a &lt;span class=&quot;caps&quot;&gt;PLUGIN&lt;/span&gt;.  This is different from a &lt;span class=&quot;caps&quot;&gt;GEM&lt;/span&gt;.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Brandon</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3206</id>
    <published>2007-07-12T21:49:26Z</published>
    <updated>2007-07-12T21:49:26Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Brandon</title>
<content type="html">&lt;p&gt;Justin,&lt;/p&gt;


	&lt;p&gt;Do you have ActiveMerchant installed as a plugin or a gem?  If you have the gem installed, then you also need to do &lt;code&gt;require 'active_merchant'&lt;/code&gt; in your environment.rb file&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Justin</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3205</id>
    <published>2007-07-12T21:43:46Z</published>
    <updated>2007-07-12T21:43:46Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Justin</title>
<content type="html">&lt;p&gt;I keep getting “uninitialized constant ActiveMerchant (NameError)” when trying to start the server with “ActiveMerchant::Billing::Base.mode = :test” in the environment.rb file.&lt;/p&gt;


	&lt;p&gt;I have “require_gem ‘money’” in the environment.rb file.&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Frank</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:3049</id>
    <published>2007-06-12T11:15:58Z</published>
    <updated>2007-06-12T11:15:58Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Frank</title>
<content type="html">&lt;p&gt;Wow, that looks great&#8230; I&#8217;m going to try it for my current project. Thank you&lt;/p&gt;</content>  </entry>
  <entry xml:base="http://www.opensoul.org/">
    <author>
      <name>Haig Didizian</name>
    </author>
    <id>tag:www.opensoul.org,2006-09-16:629:695</id>
    <published>2006-12-08T16:01:28Z</published>
    <updated>2006-12-08T16:01:28Z</updated>
    <category term="Code"/>
    <link href="http://www.opensoul.org/2006/9/16/paypal-ipn-in-rails-with-active-merchant" rel="alternate" type="text/html"/>
    <title>Comment on 'Paypal IPN in Rails with Active Merchant' by Haig Didizian</title>
<content type="html">&lt;p&gt;Thanks for this, Brandon. You saved me a good bit of time. I just wanted to add that I needed to put &#8220;require_gem &#8216;money&#8217;&#8221; into my environment.rb file to avoid a NameError exception during the notification phase.&lt;/p&gt;</content>  </entry>
</feed>
