我正在尝试将payu.in支付网关与狂潮集成到我的rails应用程序中。我已经在应用程序中包含了gem 'active_merchant_payu_in‘。
我的应用程序/模型/spree/gateway/payu.rb如下所示:
module Spree
class Gateway::Payu < Gateway
def provider_class
ActiveMerchant::Billing::Integrations::PayuIn
end
end
end在application.rb中
config.after_initialize do |app|
app.config.spree.payment_methods += [
Spree::Gateway::Payu
]
endDevelopment.rb
config.after_initialize do
ActiveMerchant::Billing::Base.mode = :test
$payu_merchant_id = ActiveMerchant::Billing::Integrations::PayuIn.merchant_id = '--ID--'
$payu_secret_key = ActiveMerchant::Billing::Integrations::PayuIn.secret_key = '--Key--'
end我从管理凭证中启用了Spree::Gateway::Payu。现在,当我做一个检查,我得到以下错误。
ActiveMerchant::Billing::Integrations::PayuIn:Module未定义方法“”中的NoMethodError
有人能指引我走向正确的道路吗。非常感谢:)
发布于 2015-07-14 14:59:59
万一有人还在面对这个问题。
解决方案:编辑您的支付方法"Spree::Gateway::Payu“,并将auto_capture?字段设置为true。
payu不支持在“自动捕获”设置为false时调用的授权方法,当设置为true时,调用由Payu支持的“购买”方法。
您可以在Spree的文档中阅读更多有关自动捕获的内容。https://guides.spreecommerce.com/developer/payments.html
https://stackoverflow.com/questions/24290388
复制相似问题