Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails payments through payumoney

I am trying to integrate payumoney payment gateway to my rails application.

I added the gem active_merchant_payu_in ,but after this am unable to start the app..and getting this console error "warning: already initialized constant APP_PATH ".. I found that this module is from activemerchant so I installed that in my gemfile instead of this and now my app starts.

As per docs this is how we setup activemerchant

ActiveMerchant::Billing::Base.mode = :test
      ::SAMPLEGATEWAY = ActiveMerchant::Billing::TrustCommerceGateway.new(
          :login => 'TestMerchant',
          :password => 'password')

So for payu I changed the gateway as below, but what should i pass instead of :login and :password in below code?

 ActiveMerchant::Billing::Base.mode = :test
  ::GATEWAY = ActiveMerchant::Billing::PayuInGateway.new(
      )

For payumoney what we all have is

Merchant ID, Merchant Key, Merchant Salt

I can't find enough documentation on it anywhere..Could someone shed some light into this topic??

like image 756
Abhilash Avatar asked Nov 10 '22 00:11

Abhilash


1 Answers

It's easy to integrate PayU with following gem, https://github.com/payu-india/PayU-Integration-Kit-ROR

Integration process is like 3 steps

1) Configure button on view (with credentials and params), on button select it takes to payu page.

2) Payu document has test credentials to test in payu page.

3)Writing a route to get response from the payu and receive the transaction status.

Gem is taken care by checksum checks, helpers, getting cart id, etc.

like image 79
Durgarao Avatar answered Nov 15 '22 06:11

Durgarao