flyerhzm / activemerchant_patch_for_china Goto Github PK
View Code? Open in Web Editor NEWA rails plugin to add an active_merchant patch for china online payment platform including alipay (支付宝), 99bill (快钱) and tenpay (财付通)
License: MIT License
A rails plugin to add an active_merchant patch for china online payment platform including alipay (支付宝), 99bill (快钱) and tenpay (财付通)
License: MIT License
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in load_missing_constant': uninitialized constant ActiveMerchant::Billing::Integrations::Helper (NameError) from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in
const_missing'
from /opt/local/lib/ruby/gems/1.8/gems/activemerchant_patch_for_china-0.1.5/lib/integrations_helper.rb:1
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/activemerchant_patch_for_china-0.1.5/lib/activemerchant_patch_for_china.rb:2
from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:41:in require' from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:41:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:36:in each' from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:36:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:35:in each' from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler/runtime.rb:35:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/bundler-0.9.11/lib/bundler.rb:72:in require' from /Users/aq1018/projects/cooltuan/config/boot.rb:121:in
load_environment'
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:137:in process' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in
send'
from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in run' from /Users/aq1018/projects/cooltuan/config/environment.rb:9 from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in'
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require' from /opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84 from script/server:3:in
require'
from script/server:3
Please fix... :D
用rails3测了一下,不得行,是我哪里弄得不对?
I found the gem is not compatible with 1.44 active merchant update.
And I tried to fork and branch the fix. however, the test seems failed.
From the link created, I got something like ILLEGAL_PARTNER error.
Can I ask how can you get the API partner, key and signature for alipay sandobx?
(I created a sandbox acct but seems not able to generate the API key
https://sandbox.alipaydev.com)
请问,以后有没有可能加入“平台商担保交易”支持?
不好意思,没看到你的例子就是rails3 的, 飘过
rails s
/Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- hmac-md5 (LoadError)
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activemerchant_patch_for_china-0.2.0/lib/active_merchant/billing/integrations/yeepay/helper.rb:1:in `<top (required)>'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activemerchant_patch_for_china-0.2.0/lib/active_merchant/billing/integrations/yeepay.rb:1:in `<top (required)>'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/activemerchant_patch_for_china-0.2.0/lib/activemerchant_patch_for_china.rb:9:in `<top (required)>'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `each'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:70:in `block in require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `each'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler/runtime.rb:59:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.0/lib/bundler.rb:132:in `require'
from /Users/stephen/meiyuewuyou/config/application.rb:11:in `<top (required)>'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:53:in `require'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:53:in `block in <top (required)>'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:50:in `tap'
from /Users/stephen/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.12/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
ActiveMerchant::Billing::Integrations::Alipay::Notification
# Take the posted data and move the relevant data into a hash
def parse(post)
@raw = post
for line in post.split('&')
key, value = line.scan( %r{^(\w+)=(.)$} ).flatten
params[key] = value
end
end
应该改为跟 activemerchant的Notification一样。
*params[key] = CGI.unescape(value || '') *
对比过 activemerchant 的Notification.parse 发现其实Alipay::Notification.parse 完全可以删除掉。
非常高兴能看到这个库,README里面的部署方式是Rails 2的,不知道现在对Rails 3的支持怎么样?
在捐助完了后,我出现了如下问题:
we're sorry , but something is wrong ,也就是rails的500错误 safari也假死了
环境safari mac10.6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.