最近使用 padrino(0.11.1) + activemerchant_patch_for_china(0.2.0) 的时候。 遇到如下错误,有经验的大神可以指导一下怎么解决吗?谢谢:)
页面代码
<% payment_service_for 'X0000001', ActiveMerchant::Billing::Integrations::Alipay::ACCOUNT,
:service => :alipay,
:html => { :id => 'payment-form', :method => :get } do |service| %>
<% service.total_fee 0.02 %>
<% service.seller :email => ActiveMerchant::Billing::Integrations::Alipay::EMAIL %>
<% service.notify_url url_for(:only_path => false, :action => 'notify') %>
<% service.return_url url_for(:only_path => false, :action => 'done') %>
<% service.show_url url_for(:only_path => false, :action => 'show') %>
<% service.body 'payment body' %>
<% service.charset "utf-8" %>
<% service.service ActiveMerchant::Billing::Integrations::Alipay::Helper::CREATE_DIRECT_PAY_BY_USER %>
<% service.payment_type 1 %>
<% service.subject 'payment subject' %>
<% service.sign %>
<% end %>
<%= button_to_function "Submit", "document.getElementById('payment-form').submit()" %>
错误信息 undefined method `call' for nil:NilClass
file: erb_handler.rb location: capture_from_template line: 32
/home/grant/.rvm/gems/ruby-2.0.0-p0/gems/padrino-helpers-0.11.1/lib/padrino-helpers/output_helpers/erb_handler.rb in capture_from_template
captured_block = block.call(*args)
/home/grant/.rvm/gems/ruby-2.0.0-p0/gems/padrino-helpers-0.11.1/lib/padrino-helpers/output_helpers.rb in capture_html
captured_html, captured_block = handler.capture_from_template(*args, &block)
/home/grant/.rvm/gems/ruby-2.0.0-p0/gems/padrino-helpers-0.11.1/lib/padrino-helpers/form_helpers.rb in form_tag
inner_form_html << mark_safe(capture_html(&block))
/home/grant/.rvm/gems/ruby-2.0.0-p0/gems/activemerchant-1.32.1/lib/active_merchant/billing/integrations/action_view_helper.rb in payment_service_for
result << form_tag(integration_module.service_url, form_options)
/home/grant/testproject/app/views/test/test.html.erb in block in singleton class
<% payment_service_for 'X0000001', ActiveMerchant::Billing::Integrations::Alipay::ACCOUNT...