Rail payments via payumoney

I am trying to integrate payumoney into my rails application.

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

In accordance with the documents, we install activemerchant

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

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

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

For payumoney we all have

Seller ID, Trading Key, Trading Salt

I can not find enough documentation on it anywhere. Can someone shed light on this topic?

+5
source share
1 answer

It is easy to integrate PayU with the following stone, https://github.com/payu-india/PayU-Integration-Kit-ROR

The integration process is like 3 steps

1) Configure the button in viewing mode (with credentials and parameters), select on the button to go to the payment page.

2) The Payu document has test credentials for testing on the payu page.

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

Gem takes care of checksums, helpers, getting the cart id, etc.

+1
source

Source: https://habr.com/ru/post/1237664/


All Articles