I am trying to integrate payu.in payment gateway into my rails app. I have integrated their gem in the application but when i go to
/admin/payment_methods/new
I am not able to see the payment gateway under the provider options.
I have followed the steps as prescribed in http://guides.spreecommerce.com/payment_gateways.html
My app/models/spree/gateway/payu.rb looks like this:
module Spree
class Gateway::Payu < Gateway
def provider_class
ActiveMerchant::Billing::Integrations::PayuIn
end
end
end
I believe you need something like this:
config.after_initialize do |app|
app.config.spree.payment_methods += [
Spree::BillingIntegration::PaypalExpress,
Spree::BillingIntegration::PaypalExpressUk
]
end
(See: https://github.com/spree/spree_paypal_express/blob/master/lib/spree_paypal_express/engine.rb#L23-28 )
For me it just worked when I added a similar line of code:
config.after_initialize do
Rails.configuration.spree.payment_methods << Spree::PaymentMethod::Pagarme
end
To my config/application.rb file.
(I saw it in http://blog.siyelo.com/active-merchant-and-spree)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With