Skip to content

Commit

Permalink
Update razorpay.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitdas13 authored Aug 1, 2023
1 parent e6ef49a commit 051f2fa
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions test_prod/razorpay.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
'use strict';

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

module.exports = new Razorpay({
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 || ""
key_secret: process.env.API_SECRET || "",
hostUrl : "https://api-web.dev.razorpay.in"
});

0 comments on commit 051f2fa

Please sign in to comment.