我正在開發一個基於Rails 3的訂閱網站,我需要使用PayPal Express Checkout(英國)進行定期付款。我發現它在ActiveMerchant中默認不支持,所以我遇到了以下博文:http://rayvinly.com/articles/2009/02/20/paypal-recurring-billing-with-activemerchant-in-ruby-on-rails/如何在我的項目中包含active_merchant的Raymond Law分支?
對於Rails來說,這是非常新的,並且遵循使用Gemfile和bundle install來安裝其他第三方代碼的方法,我試圖把它添加到Gemfile中:
gem 'active_merchant', :git => 'https://github.com/rayvinly/active_merchant.git'
然後運行bundle install。我收到以下錯誤:
Updating https://github.com/rayvinly/active_merchant.git
Fetching source index for http://rubygems.org/
Could not find gem 'active_merchant (>= 0)' in https://github.com/rayvinly/active_merchant.git (at master).
Source does not contain any versions of 'active_merchant (>= 0)'
我不知道這是將此項目加入我的項目的正確方法。
我真正想要做的是安裝最新的ActiveMerchant Gem,然後添加Raymond創建的額外Gateway部分。然而,我似乎無法找到我需要將文件放在我的項目中的位置,因爲我不確定ActiveMerchant的位置在哪裏?
任何人都可以指出我對這個方向正確嗎?這可能是我錯過的Rails 101的東西,但我似乎無法看到它。我仍然在以Rails的方式讓我的頭腦!來自10年的PHP。
在此先感謝您的幫助。
謝謝你的回覆。我最終將其添加爲插件: – slarti42uk 2011-04-13 16:27:52