Rails sample app for integrating Razorpay API. Here is the demo, this app make use of ruby gem razorpay-ruby
We can make the payment by two ways, either using simple form or javascript. see docs
or see here /app/views/products/index.html.erb
-
Razorpay::Payment.fetch(payment_id)
-
Razorpay::Payment.fetch(payment_id).capture Razorpay::Payment.fetch(payment_id).capture({amount: product_price})
-
Razorpay::Payment.fetch(payment_id).refund Razorpay::Payment.fetch(payment_id).refund({amount: refund_amount})
-
Razorpay::Payment.fetch(payment_id).refunds.all Razorpay::Payment.fetch(payment_id).refunds.all({from:Timestamp,to:Timestamp,count:2,skip:1})
You can checkout all entities returned by the Razorpay here
The reference used for this app docs.razorpay.com/v1/docs, github.com/razorpay/razorpay-ruby