pay_fu

所属分类:支付接口
开发工具:Ruby
文件大小:0KB
下载次数:0
上传日期:2012-07-27 07:31:27
上 传 者sh-1993
说明:  支持支付宝和贝宝的rails支付引擎。,
(a rails payment engine that supports both alipay and paypal.,)

文件列表:
Gemfile (629, 2012-07-27)
Gemfile.lock (2472, 2012-07-27)
MIT-LICENSE (1048, 2012-07-27)
Rakefile (799, 2012-07-27)
app/ (0, 2012-07-27)
app/assets/ (0, 2012-07-27)
app/assets/images/ (0, 2012-07-27)
app/assets/images/pay_fu/ (0, 2012-07-27)
app/assets/javascripts/ (0, 2012-07-27)
app/assets/javascripts/pay_fu/ (0, 2012-07-27)
app/assets/javascripts/pay_fu/application.js (641, 2012-07-27)
app/assets/stylesheets/ (0, 2012-07-27)
app/assets/stylesheets/pay_fu/ (0, 2012-07-27)
app/assets/stylesheets/pay_fu/application.css (545, 2012-07-27)
app/controllers/ (0, 2012-07-27)
app/controllers/pay_fu/ (0, 2012-07-27)
app/controllers/pay_fu/alipay_transactions_controller.rb (892, 2012-07-27)
app/controllers/pay_fu/application_controller.rb (78, 2012-07-27)
app/controllers/pay_fu/paypal_transactions_controller.rb (892, 2012-07-27)
app/helpers/ (0, 2012-07-27)
app/helpers/pay_fu/ (0, 2012-07-27)
app/helpers/pay_fu/alipay_helper.rb (1395, 2012-07-27)
app/helpers/pay_fu/application_helper.rb (50, 2012-07-27)
app/helpers/pay_fu/paypal_helper.rb (441, 2012-07-27)
app/models/ (0, 2012-07-27)
app/models/pay_fu/ (0, 2012-07-27)
app/models/pay_fu/alipay_transaction.rb (63, 2012-07-27)
app/models/pay_fu/paypal_transaction.rb (63, 2012-07-27)
app/models/pay_fu/transaction.rb (177, 2012-07-27)
app/views/ (0, 2012-07-27)
app/views/layouts/ (0, 2012-07-27)
app/views/layouts/pay_fu/ (0, 2012-07-27)
app/views/layouts/pay_fu/application.html.erb (246, 2012-07-27)
config/ (0, 2012-07-27)
config/routes.rb (173, 2012-07-27)
lib/ (0, 2012-07-27)
lib/generators/ (0, 2012-07-27)
... ...

# pay_fu a rails payment engine that supports both alipay and paypal. ## Setup 1) add to Gemfile ```ruby gem "pay_fu" ``` 2) install gem ```bash bundle install ``` 3) generate config file, route and migration file ```bash rails generate pay_fu:install ``` 4) update config file config/pay_fu.yml 5) run migration ```bash rake db:migrate ``` 6) in controller file, after user clicking checkout, redirect him to paypal gateway page. ```ruby include PayFu::PaypalHelper def action ... redirect_to_paypal_gateway(:item_name => "subject", :amount => 123) return end ``` 7) similar for alipay ```ruby include PayFu::AlipayHelper def action ... redirect_to_alipay_gateway(:subject => "donatecn", :body => "donatecn", :amount => @donate.amount, :out_trade_no => "123", :notify_url => pay_fu.alipay_transactions_notify_url) return end ```

近期下载者

相关文件


收藏者