diff --git a/e2e/razorpay.js b/e2e/razorpay.js new file mode 100644 index 0000000..5c2c49c --- /dev/null +++ b/e2e/razorpay.js @@ -0,0 +1,25 @@ +'use strict'; + +const Razorpay = require("../dist/razorpay"); +let request = require('request-promise'); + +class RazorpayBeta extends Razorpay { + constructor(options) { + super(options) + this.api.rq = request.defaults({ + baseUrl: options.hostUrl, + json: true, + auth: { + user: options.key_id, + pass: options.key_secret + } + }) + } +} + + +module.exports = new RazorpayBeta({ + key_id: process.env.API_KEY || "", + key_secret: process.env.API_SECRET || "", + hostUrl : "https://api-web.dev.razorpay.in" +});