Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test beta env #370

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
25 changes: 25 additions & 0 deletions e2e/razorpay.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

const Razorpay = require("../dist/razorpay");
let request = require('request-promise');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: we can use const here?


class RazorpayTest extends Razorpay {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename this Class to RazorpayBeta

constructor(options) {
super(options)
this.api.rq = request.defaults({
baseUrl: hostUrl,
json: true,
auth: {
user: options.key_id,
pass: options.key_secret
}
})
}
}


module.exports = new RazorpayTest({
key_id: process.env.API_KEY || "",
key_secret: process.env.API_SECRET || "",
hostUrl : "https://api-web.dev.razorpay.in"
});