title: Can't verify(check) paypal account
body: <p><p>
  I need to verify PayPal account, when user sign_up.
  <p>I have function(source - <a href="http://curry.byteally.com/finding-verification-status-of-a-paypal-account-ruby-on-rails-paypal-adaptive-accounts-getverifiedstatus/" rel="nofollow">http://curry.byteally.com/finding-verification-status-of-a-paypal-account-ruby-on-rails-paypal-adaptive-accounts-getverifiedstatus/</a>)
  <p>I entered my credentials and changed.
  <p> I put it i my static_pages_controller(for now).</p>
  
  <pre><code>   def verify_paypal
       ...
  //change:
  if res.status == 200
   @xml = XmlSimple.xml_in(res.content)
   #check if the status node exists in the xml
  if @xml['accountType']!=nil
  account_type = @xml['accountType'][0]
  if account_type.to_s() == "Business"
      render :text =&gt; "Business account!"
  elseif account_type.to_s() == "Premier"
      render :text =&gt; "Premier Account!"
  elseif account_type.to_s() == "Personal"
      render :text =&gt; "Personal account!"
  else
      render :text =&gt; "Account type not null but not a valid PayPal account type."
  end
     end
  </code></pre>
  
  <p>Added line in my routes.rb</p>
  
  <pre><code>  post "static_pages/verify_paypal"
  </code></pre>
  
  <p>In my views:</p>
  
  <pre><code>   &lt;%= link_to "verify", static_pages_verify_paypal_path, :method =&gt; :post %&gt;
  </code></pre>
  
  <p>But it constantly gives me text:</p>
  
  <pre><code>    "Gee! sorry! something went seriously wrong"
  </code></pre>
  
  <p>what mean, that my user isn't registered in PayPal(but it is!).</p>
  
  <p><b>EDTED</b>
  From Heroku logs:</p>
  
  <pre><code>←[33m2012-07-15T17:22:56+00:00 app[web.1]:←[0m Started POST "/static_pages/verify_paypal" for 46.119.153.97 at 2012-07-15 17:22:56 +0000
  ←[33m2012-07-15T17:22:56+00:00 app[web.1]:←[0m Processing by StaticPagesController#verify_paypal as HTML
  ←[33m2012-07-15T17:22:56+00:00 app[web.1]:←[0m   Parameters: {"authenticity_token"=&gt;"xnW29ekJqp7qBNrvIZJjPSh05AMdiHWNQMvLZhevCig="}
  ←[36m2012-07-15T17:22:57+00:00 heroku[router]:←[0m POST sharp-cloud-3895.herokuapp.com/static_pages/verify_paypal dyno=web.1 queue=0 wait=0ms service=1058ms status=200 bytes=42
  ←[33m2012-07-15T17:22:57+00:00 app[web.1]:←[0m   Rendered text template (0.0ms)
  ←[33m2012-07-15T17:22:57+00:00 app[web.1]:←[0m Completed 200 OK in 1046ms (Views: 6.7ms | ActiveRecord: 2.7ms)
  </code></pre>
  
  <p><p>First question to this line: </p>
  
  <pre><code>    "emailAddress" =&gt; params[:paypal] 
  </code></pre>
  
  <p>Can I change it into </p>
  
  <pre><code>    current_user.email
  </code></pre>
  
  <p>Second question - Where is problem and what I'm doing wrong ?</p>