Paypal Express close to working in 1.0.0

29 views
Skip to first unread message

technorcal

unread,
Feb 12, 2012, 5:32:41 AM2/12/12
to Spree
I've been working on getting the paypal_express extension to work with
Spree 1.0.0 and Rails 3.1.3. It's very close to working and with some
tweaking I got it to work in the paypal sandbox. It looks like the
work of matteofuzz, wakeless, jmandala, radar, and others have found
and fixed most of the problems and submitted pull requests which are
waiting until the dust settles on the 1.0.0 release.

Here are my notes from wrestling to get this to work on my dev
machine.
This was after setting up a clean rvm gemset and project with the demo
data.
Spree 1.0.0
Rails 3.1.3
Ruby 1.9.3p0
spree_paypal_express-5a5a1b43214f --the latest github commit
Mac OSX 10.6.8

Problems faced:

SQLite3::SQLException: no such column: spree_activators.advertise:
SELECT COUNT(*) FROM "spree_activators" WHERE
"spree_activators"."type" IN ('Spree::Promotion') AND
"spree_activators"."advertise" = 't' AND "spree_activators"."id" IN
(NULL)
no such column, made new migration

got no such column: spree_tax_categories.deleted_at
made new migration
these must be recent additions not picked up in migrations.

got paypal_express_local_confirm preference not defined
fixed in config/initializers/spree.rb
Spree::AppConfiguration.class_eval do
preference :paypal_express_local_confirm, :boolean, :default => true
end
should be added as a preference


order completed in the sandbox

when I went to admin/orders/payments got:
uninitialized constant PaypalAccount
???
so very close
fixed that with
change in gem
app/controllers/spree/checkout_controller_decorator.rb line #31
:source_type => 'Spree::PaypalAccount',
as in https://github.com/wakeless/spree_paypal_express/commit/16ff3665347ece7bf66dc8b86dcc50b3f2e48902#L0L130
but changes to return url to add "/spree" did not work. spree is the
root route so not necessary here.
THEN IT WORKED!!

payment Information not showing on thank you page but order completed.

in Admin, payment method showed and Capture worked.
YAHOO!!

So it looks like the extension is very close to working. I have not
run the tests yet. will do that tomorrow.

Reply all
Reply to author
Forward
0 new messages