Hi,

Ive followed the railscasts to integrate paypal express and
activemerchant on rails 2.5 without any issues
http://railscasts.com/episodes/146-paypal-express-checkout.

When using the same code in a rails 3.1 app i get the following error
below, this happens when i try to set the purchase up:

EXPRESS_GATEWAY.setup_purchase(100, {:return_url =>
"www.bbc.co.uk", :cancel_return_url => "www.bbc.co.uk"})

ArgumentError: wrong number of arguments (1 for 0)
from /Users/jxxxxxxxxxr/.rvm/gems/
ree-1.8.7-2010.02@mystaffdeals/gems/
builder-3.0.0/lib/builder/xmlbase.rb:135:in `to_xs'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlbase.rb:135:in `_escape'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlbase.rb:140:in `_escape_quote'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlmarkup.rb:320:in `_attr_value'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlmarkup.rb:311:in `_insert_attributes'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlmarkup.rb:310:in `each'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlmarkup.rb:310:in `_insert_attributes'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlmarkup.rb:293:in `_start_tag'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlbase.rb:60:in `method_missing'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
builder-3.0.0/lib/builder/xmlbase.rb:34:in `tag!'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
activemerchant-1.18.1/lib/active_merchant/billing/gateways/
paypal_express.rb:97:in `build_setup_request'
from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
gems/
activemerchant-1.18.1/lib/active_merchant/billing/gateways/
paypal_express.rb:25:in `setup_purchase'

Ive also followed this tutorial
http://spin.atomicobject.com/2011/10/24/integrating-paypal-express-with-rails-3-1-part-1/
and get the same error message above when i try the
gateway.setup_purchase method.

Anybody got any ideas, im really stuck now. Ive tried everything i
can think off, different versions of the activemerchant gem, etc etc
etc

JB

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Clickme t. at Aug 17, 2012 at 10:39 am

    John Butler wrote in post #1032006:
    Hi,

    Ive followed the railscasts to integrate paypal express and
    activemerchant on rails 2.5 without any issues
    http://railscasts.com/episodes/146-paypal-express-checkout.

    When using the same code in a rails 3.1 app i get the following error
    below, this happens when i try to set the purchase up:

    EXPRESS_GATEWAY.setup_purchase(100, {:return_url =>
    "www.bbc.co.uk", :cancel_return_url => "www.bbc.co.uk"})

    ArgumentError: wrong number of arguments (1 for 0)
    from /Users/jxxxxxxxxxr/.rvm/gems/
    ree-1.8.7-2010.02@mystaffdeals/gems/
    builder-3.0.0/lib/builder/xmlbase.rb:135:in `to_xs'
    from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
    gems/
    builder-3.0.0/lib/builder/xmlbase.rb:135:in `_escape'
    from /Users/xxxxxxxx/.rvm/gems/ree-1.8.7-2010.02@mystaffdeals/
    JB

    this issue due to hpricot gem with ruby 1.8.7
    if you remove hpricot you can fix this issue

    --
    Posted via http://www.ruby-forum.com/.

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 15, '11 at 2:50p
activeAug 17, '12 at 10:39a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Clickme t.: 1 post Johnnybutler7: 1 post

People

Translate

site design / logo © 2022 Grokbase