首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >payu支付网关(active_merchant_payu_in)与狂欢的集成

payu支付网关(active_merchant_payu_in)与狂欢的集成
EN

Stack Overflow用户
提问于 2014-06-18 16:11:56
回答 1查看 1.5K关注 0票数 2

我正在尝试将payu.in支付网关与狂潮集成到我的rails应用程序中。我已经在应用程序中包含了gem 'active_merchant_payu_in‘。

我的应用程序/模型/spree/gateway/payu.rb如下所示:

代码语言:javascript
复制
module Spree
  class Gateway::Payu < Gateway
    def provider_class
      ActiveMerchant::Billing::Integrations::PayuIn
    end
  end
end

在application.rb中

代码语言:javascript
复制
config.after_initialize do |app|
  app.config.spree.payment_methods += [
    Spree::Gateway::Payu
  ]
end

Development.rb

代码语言:javascript
复制
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

有人能指引我走向正确的道路吗。非常感谢:)

EN

回答 1

Stack Overflow用户

发布于 2015-07-14 14:59:59

万一有人还在面对这个问题。

解决方案:编辑您的支付方法"Spree::Gateway::Payu“,并将auto_capture?字段设置为true

payu不支持在“自动捕获”设置为false时调用的授权方法,当设置为true时,调用由Payu支持的“购买”方法。

您可以在Spree的文档中阅读更多有关自动捕获的内容。https://guides.spreecommerce.com/developer/payments.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24290388

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档