No description, website, or topics provided.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
lib
log
public
test
vendor/assets
.gitignore
Gemfile
Gemfile.lock
LICENSE.txt
README.rdoc
Rakefile
config.ru

README.rdoc

Razorpay Rails Sample App

Rails sample app for integrating Razorpay API. Here is the demo, this app make use of ruby gem razorpay-ruby

Checkout form

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

Payment Handling at backend

  • Fetch

    Razorpay::Payment.fetch(payment_id)
  • Capture

    Razorpay::Payment.fetch(payment_id).capture
    Razorpay::Payment.fetch(payment_id).capture({amount: product_price})
  • Refund

    Razorpay::Payment.fetch(payment_id).refund
    Razorpay::Payment.fetch(payment_id).refund({amount: refund_amount})
  • Refunds

    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

Source

The reference used for this app docs.razorpay.com/v1/docs, github.com/razorpay/razorpay-ruby