Accepting donations

27 views
Skip to first unread message

Noel Welsh

unread,
Apr 24, 2013, 10:17:48 AM4/24/13
to purpose-pl...@googlegroups.com
Hi all,

My current task is to accept donations. I'll lay out below my plan and current progress, and hope you guys can fill in the missing pieces.

I'm assuming I need a Porpoise site to accept donations, as the user has to enter payment details etc. To this end I've setup a basic site with help from Diego.

Using Platform I have created a "Donation Module" page and setup some dummy data (I chose GBP as the default currency, in case that is relevant). When I attempt to visit this page in my Porpoise site I get an exception (see below).

So some questions:

- How do I setup a Donation Module correctly to avoid this exception?
- How do I configure my Recurly account? I can't see any options on the page in Platform or relevant environment variables on the wiki
- As above for Paypal?
- Am I even going about things the right way here?

Thanks,
Noel

   NameError in Actions#show

Showing /Users/noel/.rvm/gems/ruby-1.9.3-p327/bundler/gems/Porpoise-6c47be14ac12/app/views/actions/_donation.html.erb where line #29 raised:

uninitialized constant ActionView::CompiledTemplates::Money

Extracted source (around line #29):

26: 
27:           <% content_module.options.suggested_amounts.attributes.each do |currency_code, amounts| %>
28:             <% default_amount = content_module.options.default_amount.attributes[currency_code] %>
29:             <% currency = Money::Currency.new(currency_code) %>
30:             <div class="suggested_amounts_wrapper amounts_for_currency_<%= currency_code %>">
31:               <% amounts.split(",").each do |amount| %>
32:                 <span class="suggested_amount">

Trace of template inclusion: /Users/noel/.rvm/gems/ruby-1.9.3-p327/bundler/gems/Porpoise-6c47be14ac12/app/views/actions/show.html.erb

Rails.root: /Users/noel/dev/purpose/test_movement

Request

Parameters:

{"locale"=>"en",
 "id"=>"recurly-test-module"}

Show session dump

Show env dump

Response

Headers:

None

Diego Marcet

unread,
Apr 24, 2013, 4:08:38 PM4/24/13
to purpose-pl...@googlegroups.com
Hi Noel,

See the answers inline:

- How do I setup a Donation Module correctly to avoid this exception?
This exception is a known issue caused by the Money gem not being included in the movement site. You can workaround it by adding the following line to your Gemfile file:
gem 'money'

 
- How do I configure my Recurly account? I can't see any options on the page in Platform or relevant environment variables on the wiki 
- As above for Paypal?
Relevant environment variables for Recurly and PayPal are:
501C3_RECURLY_ACCOUNT
501C3_RECURLY_KEY
501C4_RECURLY_ACCOUNT
501C4_RECURLY_KEY
PAYPAL_501C3_API_LOGIN
PAYPAL_501C3_API_PASSWORD
PAYPAL_501C3_API_SIGNATURE
PAYPAL_501C4_API_LOGIN
PAYPAL_501C4_API_PASSWORD
PAYPAL_501C4_API_SIGNATURE
For implementation details check porpoise/app/controllers/porpoise/recurly_configuration_helper.rb and porpoise/app/models/payment/payment_gateways.rb

 
- Am I even going about things the right way here?
Sounds like you do, please note that you will require some extra configuration on the Third Party services (especially on Recurly). Also, if you're planning on using PayPal's sandbox make sure to run the test movement site in development mode, the ActiveMerchant gem will automatically use the sandbox if env is development.
Reply all
Reply to author
Forward
0 new messages