-
Notifications
You must be signed in to change notification settings - Fork 113
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
base: master
Are you sure you want to change the base?
Test beta env #370
Changes from 5 commits
a35e37a
8663099
ae75d79
6e34066
5170381
fd20e89
282d7ef
d463011
3faaf99
bdf5018
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
'use strict'; | ||
|
||
const Razorpay = require("../dist/razorpay"); | ||
let request = require('request-promise'); | ||
|
||
class RazorpayTest extends Razorpay { | ||
constructor(options) { | ||
super(options) | ||
this.api.rq = request.defaults({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added hostUrl in options There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't mean adding it in RazorpayTest but in Razorpay class. In that case, we don't need RazorpayTest itself. We can directly use Razorpay by passing hostUrl. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just realised that adding it in class Razorpay would have other problems since that is a public API. Let's keep this as such for now. |
||
baseUrl: "https://api-web.dev.razorpay.in", | ||
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 || "" | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we rename the folder to
e2e
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have renamed the folder to e2e