将支付网关(基于activemerchant)与spree集成

pho*_*ard 5 ruby-on-rails payment-gateway spree ruby-on-rails-3.2

我正在尝试将payu.in支付网关集成到我的rails应用程序中.我已将他们的宝石集成到应用程序中,但是当我去的时候

/管理/ payment_methods /新

我无法在提供商选项下看到支付网关.

我已按照http://guides.spreecommerce.com/payment_gateways.html中规定的步骤进行操作

我的app/models/spree/gateway/payu.rb看起来像这样:

module Spree
  class Gateway::Payu < Gateway
    def provider_class
      ActiveMerchant::Billing::Integrations::PayuIn
    end
  end
end
Run Code Online (Sandbox Code Playgroud)

Gee*_*fee 4

我相信你需要这样的东西:

config.after_initialize do |app|
  app.config.spree.payment_methods += [
    Spree::BillingIntegration::PaypalExpress,
    Spree::BillingIntegration::PaypalExpressUk
  ]
end
Run Code Online (Sandbox Code Playgroud)

(参见: https: //github.com/spree/spree_paypal_express/blob/master/lib/spree_paypal_express/engine.rb#L23-28