5

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??

CodeSmith
  • 2,133
  • 1
  • 20
  • 43
Abhilash
  • 2,864
  • 3
  • 33
  • 67
  • 1
    Did you get any solution to this or proper documentation to integrate payumoney with ror? – dips Jan 26 '16 at 08:26
  • Did you get the solution? – Rajdeep Singh Mar 17 '16 at 09:52
  • 2
    @RSB no mate..Contacted them but they told me they dont have docs for ruby..I think we need to figure out our own solution. Didnt got time to figure that out so still postponed and going to try ccavenue..If you found the solution please do post here.. – Abhilash Mar 17 '16 at 11:20
  • 1
    I am also struggling with it, they have ruby docs but its incomplete. – Rajdeep Singh Mar 17 '16 at 11:29
  • 1
    HI guys, i contacted the team and they told me to try gem 'payuindia', :git => 'git://github.com/payu-india/payuindia.git' and refer this link: https://github.com/payu-india/payuindia Also make sure that you are posting one more mandatory parameter "service_provider" with value "payu_paisa". If problem still persist you can contact them via "techsupport@payumoney.com". – dips Mar 18 '16 at 07:31
  • @dips will it work for payumoney aswell? Did you implemented that into your app successfully? – Abhilash Mar 18 '16 at 09:20
  • yes I have implemented, tested in testing mode only yet – dips Mar 18 '16 at 09:48
  • @dips good to know..will try that..Thanks.. – Abhilash Mar 18 '16 at 09:53
  • @Abhilash if this is working for you now, you should self answer – Rahul Singh Aug 11 '16 at 18:12
  • @RahulSingh No I havent tried because they dont have a marketplace api.. So I moved to citrus pay :)..But if I find a solution I will update it here.. – Abhilash Aug 11 '16 at 18:20
  • Anyone got the exact solution regarding this problem ? – Vishal Nagda Dec 01 '16 at 19:23

1 Answers1

1

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.

Durgarao
  • 71
  • 4
  • I think payumoney have different implementation – Abhilash Dec 29 '16 at 13:55
  • It will be the same process, but test credentials is some thing we can figure out from [FAQ's](https://developer.payubiz.in/documentation/Web-Integration-FAQ's/166). – Durgarao Dec 30 '16 at 03:47