Skip to content

Elite-Digital-Crew/medusa-payment-razorpay

 
 

Repository files navigation

MEDUSA-PAYMENT-RAZORPAY

RAZORPAY an immensely popular payment gateway with a host of features. This plugin enables the razorpay payment interface on medusa commerce stack

Installation

Use the package manager npm to install medusa-payment-razorpay.

npm install medusa-payment-razorpay

Usage

Register for a razorpay account and generate the api keys In your environment file (.env) you need to define

RAZORPAY_API_KEY=<your api key>
RAZORPAY_API_KEY_SECRET=<your api key secret>

You need to add the plugin into your medusa-config.js as shown below

const plugins = [
  ...,
  {
    resolve:`medusa-payment-razorpay`,
    options:{
        api_key : process.env.RAZORPAY_API_KEY,
        api_key_secret:process.env.RAZORPAY_API_KEY_SECRET
    }
  },
  ...]

client side configuration

You can refer this to see how the client side is implemented for the gatsby medusa starter SGFGOV:feat/medusa-payment-razorpay (https://github.com/SGFGOV/gatsby-starter-medusa/tree/feat/medusa-payment-razorpay)

On the client you need to specify on the api key not the api secrets :)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Disclaimer

The code was tested on limited number of usage scenarios. There maybe unforseen bugs, please raise the issues as they come, or create pull requests if you'd like to submit fixes.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%