Skip to content

Releases: razorpay/razorpay-ruby

2.1.0

17 Nov 13:03
Compare
Choose a tag to compare

Changed

  • Generic Razorpay::Error is thrown when server is unreachable

Added

  • Support for making raw requests to the API via raw_request.

2.1.0.pre

17 Aug 15:26
Compare
Choose a tag to compare
2.1.0.pre Pre-release
Pre-release

Added

  • Support for Virtual Accounts

Pre-release gems version can be installed by using the --pre flag.

gem install razorpay --prerelease

See gem docs for more details

2.0.1

31 Jul 08:29
Compare
Choose a tag to compare

Fixed

  • Webhook signature verification

The webhook signature verification method was fixed to allow custom secrets for webhooks. We also changed the method signature to make it consistent across all SDKs.

Wiki: Webhooks

2.0.0

02 Mar 10:38
Compare
Choose a tag to compare

Major upgrade with lots of changes:

Added

  • Adds require for all Razorpay supported entities. (Fixes #9 #16 #20 #27)
  • Adds customer edit API
  • Adds card fetch API
  • Adds custom header support
  • Adds constant time signature verification API for payments and webhooks. See Upgrade Notes below on usage
  • Adds payment capture-without-fetch API. See Upgrade Notes.
  • Upgraded httparty dependency

Changed:

  • Refund fetch has been changed. See Upgrade Notes.
  • All entity objects now throw NoMethodError instead of NameError if the attribute doesn't exist

Development:

  • Enables warnings for tests
  • Removes circular require calls
  • Now tested against ruby 2.4
  • Upgraded development dependencies.

Upgrade Notes

  • To fetch a collection of all refunds for a payment, you must now use payment_entity.refunds instead of payment_entity.refunds.all.

    Note that the older method will no longer work, and will throw a NoMethodError

    # v1
    Razorpay::Payment::fetch('payment_id').refunds.all
    => <Razorpay::Collection>
    
    # v2
    Razorpay::Payment::fetch('payment_id').refunds
    => <Razorpay::Collection>
    # v2
    Razorpay::Payment::fetch('payment_id').refunds.all
    => NoMethodError: undefined method `all' for #<Razorpay::Collection>
  • Payment can be captured without fetching it.

    # v1
    Razorpay::Payment.fetch('payment_id').capture({amount:500})
    # v2
    Razorpay::Payment.capture('payment_id', {amount:500})
  • Utility class can be used to verify signatures received from Razorpay

    • Payment response verification
     puts payment_response
     # {
     #   :razorpay_order_id   => "dummy_order_id",
     #   :razorpay_payment_id => "dummy_payment_id",
     #   :razorpay_signature  => "dummy_signature"
     # }
     Razorpay::Utility.verify_payment_signature(payment_response)

    You can find more details at the Orders API Documentation

    • Webhook verification
     Razorpay::Utility.verify_webhook_signature(webhook_signature, webhook_body)

    More details at the Webhooks Documentation

1.2.1

22 Dec 16:49
Compare
Choose a tag to compare

[1.2.1] - 2016-12-22

Changed

  • Drops ArgumentError checks for local validation. Rely on server side checks instead.

Added

  • Support for customers and invoices API
  • Loads Order class by default.